define key for object code example
Example 1: js object keys
var myObj = {no:'u',my:'sql'}
var keys = Object.keys(myObj);//returnes the array ['no','my'];
Example 2: js variable for key obj
{
[yourKeyVariable]: someValueArray,
}
var myObj = {no:'u',my:'sql'}
var keys = Object.keys(myObj);//returnes the array ['no','my'];
{
[yourKeyVariable]: someValueArray,
}