This is my JSON
with Javascript
:
/**
* @param {String} value1
* @param {String} value2
* @param {String} value3
* @param {Number} value4
*
* @constructor
* @properties={typeid:24,uuid:"F146465E-7D8C-4D8B-B37C-954E65AFBEAD"}
*/
function CarData (value1, value2, value3, value4)
{
this.car = {
field1: value1,
field2: value2,
field3: value3,
field4: value4
}
}
I want to do that the fieldX
be dynamic like the value passed with parameters.
Is that possible?
Then I will transform that object to JSON with:
JSON.stringify(object);