I got a response from a rest call and such that (Ref ? Ref : "UNKNOWN"),source.datetime.replace(/T/, ' ').replace(/Z/, '') and source.status_code have the respective response values.This is in one if loop and I consoled this in a variable and it displays as
var data = (Ref ?Ref : "UNKNOWN") + source.datetime.replace(/T/, ' ').replace(/Z/, '') +source.status_code ;
In logs i get as
dataaaaa 50073151 2017-02-24 16:14:41.203200 OK
dataaaaa 50005230 2017-02-24 15:40:46.190200 OK
dataaaaa 50073481 2017-02-24 09:16:14.885200 OK
Now I have a array as
var content = '{Ref":"","createdTime":"","responseCode":""}'
So I want to store above response as json object as
{{Ref":"50073151","createdTime":"2017-02-24 16:14:41.203","responseCode":"200 OK"},{Ref":
"50005230","createdTime":"2017-02-24 15:40:46.190","responseCode":"200 OK"},{Ref":
"50073481","createdTime":"2017-02-24 09:16:14.885","responseCode":"200 OK"}}
How can we get this..can some help me in this..Thanks!