Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement : How about adding new API's - JSON.Update()/JSON.Add() - which would help update the source JSON object #66

Open
SorrowfulBlinger opened this issue Nov 30, 2015 · 0 comments

Comments

@SorrowfulBlinger
Copy link

As of now, updating/adding new key to JSON object is not straightforward . First a search needs to be done to get the object and then it needs to be updated. Instead why not have a JSON.Update() API just like JSON.search() ?

Adding new keys to the JSON object is even more complex. In the below fiddle the new array object ({"e" "f":}) does not get reflected in the original JSON object (data) on which search was done.
So if my application involves read/write of JSON objects the updation part becomes clumsy .
https://jsfiddle.net/2kHDZ/122/

@SorrowfulBlinger SorrowfulBlinger changed the title Enhancement : How about adding new API's - SetKey , which would help update the JSON object in action Enhancement : How about adding new API's - JSON.Update()/JSON.Add() - which would help update the JSON object in action Nov 30, 2015
@SorrowfulBlinger SorrowfulBlinger changed the title Enhancement : How about adding new API's - JSON.Update()/JSON.Add() - which would help update the JSON object in action Enhancement : How about adding new API's - JSON.Update()/JSON.Add() - which would help update the source JSON object Nov 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants