Answer the question
In order to leave comments, you need to log in
Is there a JSON filter as opposed to jQuery.extend/merge?
Hello colleagues.
I am looking for a JavaScript function that will allow me to leave only the necessary nodes in a multilevel json object. Is there such a thing in mind?
Example:
json object:
obj = {"fio":{"name":"nameValue2", "surname":"surnameValue2", "patronymic":"patronimicValue2", "arrOrganization":[{"id":"id21" , "name":"oName21"}, {"name":"oName22"}], "propJson":{"prop1":"value1", "prop2":"value2"}}}
It is necessary to leave only the fields in it "fio.name", "fio.surname", "fio.arrOrganization" (but only "id", no name):
{"fio":{"name":"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question