What is dot notation?
Dot notation is a way to access specific properties of an object or array using a period (.) to separate the property name from the object or array.Using dot notation with objects
Let’s say we have the following object:created_at
property to be human readable, we would use dot notation to target that property directly, like this:

created_at
inside of the object and update it to Wed, 08 Jan 2025 19:27:53 +0000
.
You can also use dot notation to create new properties inside of an object. Our user object doesn’t have a location
property yet, so we can add it like this:

Using dot notation with arrays
Arrays are a little different than objects in that they are indexed, starting at 0. So, the first item in the array is at index 0, the second item is at index 1, and so on. Theindex
just refers to the position of the item in the array.
Let’s say we have the following array:

orange
.
Using dot notation with complex nested data
You can use dot notation with any combination of nested arrays and objects. Let’s say we have the following array:
Try it out
You can create a new API or custom function and paste the following XanoScript into the editor to see it in action. Feel free to experiment and modify the logic to get a feel for how it works.Dot notation example