So, I have the following mixed array in js:
var MY_INFO = {
'NAME' : ['input1', 'inpu2', 'input3']
};
I need to push values into this format. How can I achieve this?
Thanks.
EDIT:
Realized that my question was not specific enough.
So, I have 4 specific data:
- Name
- Input1
- Input2
- Input3
The function is :
function push_my_info(name,input1,input2,input3){
var MY_INFO = {
name : [input1, input2, input3]
};
}
Something like this..
However, bit confused to how to push
it properly so there can be multiple "top" objects.