I have an object as show below:
var obj = {
"title":"dummyTitle",
"description":"dummyDescription",
"valid":"true"
}
to the above already declared object I want to add a key value pair which is something like:
var propertiesKey="property", //key
var propertiesValue={ //value
"propertyA":"a",
"propertyB":"b"
}
so this can be achieved by doing
obj[propertiesKey]=propertiesValue
but that would append it at the last of my existing object. What if i want to append it after title
key ?