fix: SEO javascript references (#35)

This commit is contained in:
Eric Tuvesson
2023-10-04 10:15:41 +02:00
committed by GitHub
parent e7fff32c45
commit 5347280c91
13 changed files with 12 additions and 12 deletions

View File

@@ -0,0 +1,41 @@
---
hide_title: true
hide_table_of_contents: true
title: Noodl.Objects
---
# Noodl.Objects
One step above **Variable**s are **Object**s,
this is a global data model of Noodl objects.
Each object is referenced with an **Id** and can contain a set of properties.
You can access all objects in your workspace through their **Id** and the `Noodl.Objects` prefix.
Change a property of an object will trigger all connections from object nodes with the corresponding **Id** and property.
You can learn more about objects and how you use them in your Noodl applications [here](/docs/guides/data/objects).
<div className="ndl-image-with-background xl">
![](/javascript/reference/objects/objects.png)
</div>
```javascript
// This will change the property MyProperty
// of object with id MyObjectId and trigger
// all object nodes (with that id) in your project
Noodl.Objects.MyObjectId.MyProperty = "Hello";
// Use this notation of that object id contains spaces
Noodl.Objects["Form Values"].input_text = "Whoops";
Noodl.Objects["Form Values"]["A property with spaces"] = 20;
// Reading an object property
console.log(Noodl.Objects.CurrentUser.Name);
// This will set all properties of the object you assign with
// to the object with id "SomeId"
// You cannot set the id property this way,
// that property will be ignored if part of the object you assign
Noodl.Objects.SomeId = { ... }
```