Skip to content

Expression to match jsonobject based of value #645

Open
@Kurukshetran

Description

@Kurukshetran
{
    "userName": "test"
    "customer": {
		"mode": "BANK",
		"modeDetails": {
		    "accountNo": "12345678901001",
			"walletId": "11324354@paypal"
		}
	}
}

I am using jsonpath to select accountNo if mode="BANK" or else if mode=WALLET then walletId should be selected. I tried expression $.customer.modeDetails[$.customer.mode=='BANK'].accountNo but it doesn't work. Please help me on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions