skip to Main Content

I need to parse particular json file but stucked

There are json file with variable quantity of elements describing the keywords. The following is the typical example: {"keywords":[{"keyword":"halloween","score":0.9621220167107003}, {"keyword":"pumpkin","score":0.9527655356551675}, {"keyword":"nature","score":0.8530320061364176}, {"keyword":"animal","score":0.7936456829239327}],"status":"ok"} The script should parce this json and I need to get a line with keywords formatted as following:…

VIEW QUESTION

Parse values from JSON body

I have the attached following actions parameter part of my JSON data. 'actions': [{'action_type': 'onsite_conversion.post_save', 'value': '1'}, {'action_type': 'link_click', 'value': '2'}, {'action_type': 'post', 'value': '3'}, {'action_type': 'post_reaction', 'value': '4'}, {'action_type': 'video_view', 'value': '5'}, {'action_type': 'post_engagement', 'value': '6'}, {'action_type': 'page_engagement', 'value':…

VIEW QUESTION

Parse JSON in java (custom)

I have a JSON array in the following format: [["1234","OS","01/31/2023","02/01/2023","First Day"],["1245","OS","01/23/2023","01/24/2023","Last Day"],["3411","OS","09/21/2022","09/21/2022","Second Day"]] In Java, I would like to parse this array and store data in the following format: String[] firstElements = ["1234" , "1245", "3411"]; String[] secondElements = ["OS",…

VIEW QUESTION

Parsing JSON with Python to retrieve values within a dictionary

I am trying to parse JSON and retrieve a certain value (ID) but I am getting the following error: TypeError: string indices must be integers The following is my code and JSON: import json # JSON string info_symbol = '{"status":{"timestamp":"2023-01-21T15:18:43.937Z","error_code":0,"error_message":null,"elapsed":21,"credit_count":1,"notice":null},"data":{"BITCOIN":{"id":15907,"name":"HarryPotterObamaSonic10Inu","symbol":"BITCOIN"}}}'…

VIEW QUESTION
Back To Top
Search