Skip to content
Advertisement

create custom nested output from json using javascript

JavaScript

I am trying to save data in json object by using map function but the problem is I can save data by using needed_key:value.arrayData.key needed_value:value.arrayData.value

if all the needed_key and needed_value are same I can use above code but here problem is key name is same but the needed_value get change by random and value I only want to save values of those data which contain in value not random is there any way I can get key and value value not key and random value

I can use manual code to fetch the data but what if data is more and I don’t want to use manual code

Expected Output

JavaScript

Advertisement

Answer

This gives your output:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement