Click multidimensional array in jQuery

I have an array set to "values", and inside the array is a multidimensional array called elements.

values = { full_name: fullname, items: [{'item-id': '001', 'item-special': 'nothing'}, {'item-id': '031', 'item-special': 'Make it blue'}], address_full: address }; 

How would I push more elements into an array?

 {'item-id': '055', 'item-special': 'Extra large'} 
+4
source share
1 answer

Sort of:

 values.items.push({'item-id': '055', 'item-special': 'Extra large'}); 

must work:)

+5
source

Source: https://habr.com/ru/post/1384437/


All Articles