I have a object:
var someObject={};
and i have a function that adds to the object:
function add(id, firstName){
//stuff that makes sure id and firstName are correct format and stuff and say if firstName is john and id is I23423
someObject.id=firstName;
}
but it always output as
someObject{
id="john"
}
but I want the id to be whatever the user inputs the id as, so the output will be
someObject{
I23423="John"
}
what do I add/change?