I have an object like this
==================records=========={ Id: 5114a3c21203e0d811000088,
userId: \'test\',
sUserId: test,
userName: \'test\',
ur
If you have loaded this object into records
, both records.Name = "test"
or records['Name'] = "test"
will work. You have either not loaded the object correctly, or are inserting an undefined value into it.
To test: add console.log(records.userId)
, this should print 'test' to the terminal.
Also add console.log(name)
. If you get ReferenceError: name is not defined
, you obviously cannot do: records.Name = name