data.listData: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added category to page.)
(Minimal Update)
Line 1: Line 1:
{{Stub}}
{{Stub}}
<pre>data.listData(type, nameSpace)</pre>
Returns a JSON array of JSON dictionaries describing each element of data within the namespace. These dictionaries include the name of the data entry, the type (such as <code>JSON_OBJECT</code>) and the value held within the data.
Example:
<pre>[h: val= data.listData("addon:", "ca.pf2e")][h, foreach(a, val), code:{[h: broadcast(json.get(a,"name") + ":" + json.get(a,"type"))]}]
pf2e_kit:JSON_OBJECT
pf2e_null:JSON_OBJECT
pf2e_effect:JSON_OBJECT
pf2e_publications:STRING
pf2e_ancestry:JSON_OBJECT
pf2e_item:JSON_OBJECT
pf2e_condition:JSON_OBJECT
events:JSON_OBJECT
pf2e_spell:JSON_OBJECT
library:JSON_OBJECT
pf2e_npc:JSON_OBJECT
pf2e_heritage:JSON_OBJECT
pf2e_hazard:JSON_OBJECT
pf2e_source:JSON_OBJECT
internal:needsInit:BOOLEAN
pf2e_enabledSources:STRING
pf2e_tagData:JSON_OBJECT
pf2e_feat:JSON_OBJECT
remaster_changes:JSON_OBJECT
pf2e_vehicle:JSON_OBJECT
pf2e_action:JSON_OBJECT
pf2e_glossary:JSON_OBJECT
image_dict:JSON_OBJECT
pf2e_class:JSON_OBJECT
pf2e_background:JSON_OBJECT</pre>
[[Category:Macro Function]]
[[Category:Macro Function]]
[[Category:Stub]]
[[Category:Stub]]

Revision as of 02:40, 4 May 2024

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.

data.listData(type, nameSpace)

Returns a JSON array of JSON dictionaries describing each element of data within the namespace. These dictionaries include the name of the data entry, the type (such as JSON_OBJECT) and the value held within the data.

Example:

[h: val= data.listData("addon:", "ca.pf2e")][h, foreach(a, val), code:{[h: broadcast(json.get(a,"name") + ":" + json.get(a,"type"))]}]

pf2e_kit:JSON_OBJECT
pf2e_null:JSON_OBJECT
pf2e_effect:JSON_OBJECT
pf2e_publications:STRING
pf2e_ancestry:JSON_OBJECT
pf2e_item:JSON_OBJECT
pf2e_condition:JSON_OBJECT
events:JSON_OBJECT
pf2e_spell:JSON_OBJECT
library:JSON_OBJECT
pf2e_npc:JSON_OBJECT
pf2e_heritage:JSON_OBJECT
pf2e_hazard:JSON_OBJECT
pf2e_source:JSON_OBJECT
internal:needsInit:BOOLEAN
pf2e_enabledSources:STRING
pf2e_tagData:JSON_OBJECT
pf2e_feat:JSON_OBJECT
remaster_changes:JSON_OBJECT
pf2e_vehicle:JSON_OBJECT
pf2e_action:JSON_OBJECT
pf2e_glossary:JSON_OBJECT
image_dict:JSON_OBJECT
pf2e_class:JSON_OBJECT
pf2e_background:JSON_OBJECT