how do I retrieve a field value with tile38?

262 Views Asked by At

I'm learning tile38 and trying to figure out fields.

I am setting a field like so:

set fleet truck1 field speed 45 point 1 1
{"ok":true,"elapsed":"42.7µs"}

But when I get the object the field does not show up?

get fleet truck1
{"ok":true,"object":{"type":"Point","coordinates":[1,1]},"elapsed":"29.3µs"}

1

There are 1 best solutions below

0
On

The WITHFIELDS option is required to return field values:

"The WITHFIELDS option will also return the fields that belong to the object. Field values that are equal to zero are omitted."

See https://tile38.com/commands/get