JSON Parser
Sometimes in Rails, it cannot read the JSON itself it happens to me when we use AWS. You need to parse the JSON value to perform new JSON format. See the sample code below.
Get the unknown key
data = is your json to parse
json = ActiveSupport::JSON.decode(data)
head = "#{json['datasetRecords'].keys.first}"
No comments:
Post a Comment