How can i edit multiple json documents from the site

0 votes
How can i use App42 Cloud Api to edit a value for a key in multiple json documents
asked Aug 11, 2016 in Discuss & suggest API by w.ajdi1 (33 points)

1 Answer

0 votes

Hi,

You can find the all docs having that specific key using FindDocumentsByKeyValue and then update each doc individually using UpdateDocumentByDocID.

Let me know if you have any further queries.

Regards,

Rajeev

answered Aug 12, 2016 by rajeev.etc (1,660 points)
In my game i will make a doc for every user and it will contain the key coins
And i may want to give people free coins how can i do that from the site
So in this case, the doc will be unique for each and every user and you must be having a key to uniquely identify the user's doc. If yes, you can use UpdateDocumentByKeyValue API. Where you need to pass the key and value which can uniquely identify the user's doc which need to be modified and the value should be complete jsonDoc with the modified keys and values. Please have a look at the API doc here( http://api.shephertz.com/app42-docs/nosql-storage-service/?sdk=iOS#update-document-by-key-value-with-json-object ) to get more info about the API.
I know i can do it from the app but i want to change all the values for a specific key from the site ,i can only edit a document for one user per time like this
https://s9.postimg.org/687rshsm7/image.jpg
But i want to edit a value for all the documents
Yes, you are right. As of now only one jsonDoc can be edited from the dashboard.
If I wanted to edit more than one will I have to do it through api
Can you please add this to the dashboard it is really important
Please answer
Yes, you can modify the multiple docs using our APIs. We have not given this from dashboard to keep the user interface simple and avoid mistakes.
Let me know if you have any other queries.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...