JSON Get Object name (v9.2)

Hello,

I'm trying to catch an Object Name inside a JSON variable.
I'm aware of the [https://wiki.keyboardmaestro.com/function/JSONVALUE](https://JSON function).
But I can't figure out how to get an object or key name.

In this JSON:
{"previousName":"2021-02-23-18-20-50.341.C8D40A19-B261-479C-8A64-710533F8A217.json","changes":{"update":{"Estimate":{"03266189-A859-4ECD-A311-94B6DD38A8A2":{}}}},"name":"2021-02-24-12-58-00.082.D95595B9-40AF-4312-BDD0-CEB53BF258FB.json","session":{"userName":"cobalt","id":"FC888BF4-3919-4F23-BA72-01F813FE56E9","osVersion":"10.13.6","version":"7.0.4","machineName":"Vert","userInfo":{"keys":[{"Seats":2,"TransactionID":"7A267442FE055791P"}]},"fullUserName":"cobalt"},"date":"2021-02-24T12:58:00.082+0000"}

I would like to get the UID "03266189-A859-4ECD-A311-94B6DD38A8A2" just after "Estimate" who's an object and not a value.

Thanks for your help

Actions (v9.2)

Keyboard Maestro Actions.kmactions (1.1 KB)

Hi, you are very close to what you are looking for.
You have narrowed down to get {"03266189-A859-4ECD-A311-94B6DD38A8A2":{}}.
You only need one more step to go:

Next, you can either use a regex search to get the string in the double quote. (Note: I use a different variable name).
image

Or, you can use the JSON key action to get the key.
image

1 Like

Thanks Martin, that's exactly what I need