skip to Main Content

Combining multiple json arrays

I'm trying to combine two json files with arrays in common using jq (example below): file1.json { "veg": { "trolley": [ "potato" ], "total_items": [ 1 ] } } file2.json { "veg": { "trolley": [ "lettuce", "tomato" ], "total_items": […

VIEW QUESTION

Json – A regex that will capture all text after a colon but ends with a comma – within can be nested brackets, commas etc

I am trying to redact something that log4j is overriding in general. To do this, I am trying to change a regex to ensure it captures what I need...an example... "definition":{"schema":{"columns":[{"dataType":"INT","name":"column_a","description":"description1"},{"dataType":"INT","name":"column_b","description":"description2"}]}}}, "some other stuff": ["SOME_STUFF"], etc. Hoping to capture just...…

VIEW QUESTION

Beatifulsoup output is Json not HTML, so I cannot parse it using .find methods of bs4

I'm trying to scrape this site. I used the following code: import requests import json from bs4 import BeautifulSoup api_url ='https://seniorcarefinder.com/Providers/List' headers= { "Content-Type":"application/json; charset=utf-8", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0"} body_first_page={"Services":["Independent Living","Assisted Living","Long-Term Care /…

VIEW QUESTION

How to compare and manipulate json object

I need to compare and manipulate JSON objects. First object let data1 = { "id": "111", "entity_id": "222", "text_id": "333", "details": [{ "value": 1000, "comp_id": "444", "CompName": "driving" }] } Second object let data2 = [{ "id": "111", "text_id": "333",…

VIEW QUESTION

Pyspark – Flatten nested json

I have a json that looks like this: [ { "event_date": "20221207", "user_properties": [ { "key": "user_id", "value": { "set_timestamp_micros": "1670450329209558" } }, { "key": "doc_id", "value": { "set_timestamp_micros": "1670450329209558" } } ] }, { "event_date": "20221208", "user_properties": [ {…

VIEW QUESTION
Back To Top
Search