What is wrong in parsing following JSON data
'{
{"errors":
{"firstname":"is too short"}
},
{"account":
{"firstname":"Test"}
}
}'
for which a get this error?
JSON::ParserError in AccountsController#home
706: unexpected token at ... # the code above
?
In the AccountsController I have
JSON.parse(json_data)["errors"]
You’re missing property names:
Or, you really wanted an array: