Question

Filter JSON

  • 13 March 2023
  • 3 replies
  • 47 views

Userlevel 7
Badge +13

Hello,

 

I need a way to get the ID by filtering the value on the subject ( ya I know it’s a bad field to use)
Can’t see a way to do it with the JSON parser node. 

 

{
"onboarding_tickets": [
{
"id": 23989,
"created_at": "2023-03-13T10:03:11Z",
"updated_at": "2023-03-13T10:03:16Z",
"subject": "Onboarding for - Starting: 2023-03-27 [#SR-23989]",
"responder_email": "info@mail.com",
"status": 2,
"parent": true
},
{
"id": 23990,
"created_at": "2023-03-13T10:03:12Z",
"updated_at": "2023-03-13T10:03:15Z",
"subject": "1. HR ONB for - Starting: 2023-03-27 [#SR-23990]",
"responder_email": "",
"status": 2,
"parent": false,
"predecessor_ticket_id": null,
"successor_ticket_ids": [
23991
]
},
{
"id": 23991,
"created_at": "2023-03-13T10:03:12Z",
"updated_at": "2023-03-13T10:03:16Z",
"subject": "3. UM ONB for - Starting: 2023-03-27 [#SR-23991]",
"responder_email": "",
"status": 9,
"parent": false,
"predecessor_ticket_id": 23990,
"successor_ticket_ids": [
23992,
23993
]
}
]
}

 


3 replies

Userlevel 7
Badge +13

I have found a solution to this ( I think) 

$.onboarding_tickets[?(@.subject.includes('3. UM'))].id

It’s static but it gives my the correct output in the JSON parser nod preview.

Issue now is to get the data, can’t find the ID for the onboard in the view ticket API 

Userlevel 3
Badge +2

I don’t understand why you would not just use the Placeholder to get the information? andn the JSON parser does work to get the ID as well

 

Userlevel 7
Badge +13

I don’t understand why you would not just use the Placeholder to get the information? andn the JSON parser does work to get the ID as well

 

I’m not talking about the ticket ID it’s the Onboard ID, the onboard module has it’s own ID number 

Reply