You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on an asynchronous user interface application. I have a json object along with read-only and edit templates on the client. When the user invokes edit I can show the edit form instantly. I am now working on showing the new read-only view after the user hits save (with the new edited values) immediately. I found your code as a good solution for building that new JSON object to pass into the template engine.
I've made a local copy change to make the main methods take in a json object instead of creating a new one and it works. Do you think it is a fit in your project?
functionform2js(rootNode,json,delimiter,skipEmpty,nodeCallback,useIdIfEmptyName){//... only change is to pass in new 'json' value to processNameValues ...}functionprocessNameValues(json,nameValues,skipEmpty,delimiter){//... only change is to set values on 'json' parameter instead of 'result' variablereturnjson;}
you could still have an 'overload' for the current use case that just calls into the new method interface. That would keep the script backwards compatible and add only a couple lines of code to the file.
Thanks for the great script!
I am working on an asynchronous user interface application. I have a json object along with read-only and edit templates on the client. When the user invokes edit I can show the edit form instantly. I am now working on showing the new read-only view after the user hits save (with the new edited values) immediately. I found your code as a good solution for building that new JSON object to pass into the template engine.
I've made a local copy change to make the main methods take in a json object instead of creating a new one and it works. Do you think it is a fit in your project?
from this:
to this:
you could still have an 'overload' for the current use case that just calls into the new method interface. That would keep the script backwards compatible and add only a couple lines of code to the file.
The text was updated successfully, but these errors were encountered: