# Getting world object data

To get the current WorldObject data you can use the `GetWorldObjects()` function which returns a table containing them

## Example script

```lua
objects = GetWorldObjects()

-- if object itemID is equal to 112 (Gems) then it will print the position of the object
for _, obj in pairs(objects) do
    if obj.item_id == 112 then
        log(("Found Gems at %d, %d"):format(obj.pos.x, obj.pos.y))
    end
end
```
