0

My expression is

 {
    "author": "%{\"id\" => \"f63b6f8a-4e3e-4884-8ce8-21a7885da7a7\", \"name\" => \"Bye\", \"type\" => \"AUTOMATOR\"}"
  }

How do I return AUTOMATOR in the above express?

I am using JSON_EXTRACT(author,"$.type"). Tt is not returning anything

Manoj
  • 2,059
  • 3
  • 12
  • 24

1 Answers1

0

Your json seems to be not valid.

Correct json will be:

 { "author": {"id" :"f63b6f8a-4e3e-4884-8ce8-21a7885da7a7", "name": "Bye", "type" : "AUTOMATOR"} }

you can validate JSONs online, for example at: https://jsonformatter.curiousconcept.com/#

Nikita
  • 94
  • 1
  • 3