Skip to main content
Question

Filter JSON


Daniel Söderlund
Skilled Expert
Forum|alt.badge.img+14

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
            ]
        }
    ]
}

 

Did this topic help you find an answer to your question?

3 replies

Daniel Söderlund
Skilled Expert
Forum|alt.badge.img+14

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 


ekrasner
Community Debut
Forum|alt.badge.img+2
  • Community Debut
  • 24 replies
  • April 26, 2023

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

 


Daniel Söderlund
Skilled Expert
Forum|alt.badge.img+14
ekrasner wrote:

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