Skip to content
Advertisement

Modify values inside a Javascript object

I have the following array if objects:

JavaScript

Then i elaborate the following one:

JavaScript

is it possible to change the value of ‘options’ array of the first one, according to the second set of options? i need to obtain something like:

JavaScript

Advertisement

Answer

i solved this way (locattributes is the first object, newopt the second) i don’t know if there is a more efficient way to do i

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