0

I have the following JSON:

{
    "Dialog_1": {
      "en": {
        "label_1595938607000": "Label1",
        "newLabel": "Label2"
      }
    }
}

I want to extract "Label1" by using JSONPath. The problem is that each time I get a JSON with a different number after "label_", and I'm looking for a consistent JSONPath expression that will return the value for any key that begins with "label_" (without knowing in advance the number after the underscore).

Yishai S
  • 21
  • 3

1 Answers1

0

It is not possible with JSONPath. EL or Expression Language does not have sch capability.

Besides, I think you need to review your design. Why the variable name is going to be changed all the time? If it is changing then it is data and you need to keep it in a variable. You cannot keep data in data.

Morteza
  • 642
  • 7
  • 17