I have an json object like so:
{
{
name: "foo"
surname: "bar"
},
{
name: "hello",
surname: "world"
}
}
I have two questions:
What is the quickest way to convert this into an array [ {...}, {...} ]
?
How can I find the last object in the object list? e.g return
{
name: "hello",
surname: "world"
}