skip to Main Content

Unable to create Regex for JSON value

I have JSON for which I sometimes got some alphanumeric name in one key value name and sometimes it is null like below. {"name":"77Watcher"} {"name":null} I have to validate the data I am using like below. {"name":"${json-unit.matches:^([A-Za-z0-9]+|null)$}"} But getting Matcher…

VIEW QUESTION

Javascript – how to optimize fetching data from JSON

Is there any solutions of fetching data more fast and determine data length without loading all JSON data. Here is code const url = "https://jsonplaceholder.typicode.com/comments"; const [data, setData] = useState([]); const [colorScheme, setColorScheme] = useState(true); const [loader, setLoader] = useState(true);…

VIEW QUESTION

Jq how to merge two json objects

I want to merge two JSON objects that has a common key Object A { "extensions": { "app_name": "extensions-prod" }, "plugins": { "app_name": "plugins-prod" } } Object B { "plugins": { "project_name": "plugins-prod" } } Desired output: { "plugins": {…

VIEW QUESTION

Json – JQ – group duplicates not remove

I am trying to group the duplicates from the following json by id, but remove duplicates . Here is the json: { "intId": "97210f2c23f45b55569f32309105f395c94", "extId": "39e9588ee62d1cccc711d75ff86c5570", "name": "generic name", "users": { "186-1": { "userKey": "186-1", "extId": "186", "intIds": { "w_eyvyfghz844o":…

VIEW QUESTION
Back To Top
Search