Query LOM property directly

Thijs Koerselman's icon

I am looking for a way to query a property somewhere in the LOM directly, without having to set a path + property + callback and getting the value from the callback arguments.

For example:
var name = api.get("this_device canonical_parent clip_slots 1 clip name");

Or maybe some way to get a property based on a live object id (received from goto() for example) ?
var id = 123 // some clip id
var clipname = api.get(id, "name");

Is there anything available like this?

Thijs Koerselman's icon

Nevermind. I figured it out. You don't need the callback to to this.

api.goto("this_device canonical_parent clip_slots 1 clip");
var name = clip.get("name");

Thijs Koerselman's icon

Sorry if I confused you but clip.get should've been api.get in this example.