Skip to content

5. Mapping

coffeeRequired edited this page Mar 6, 2024 · 3 revisions

SkJson

Pages - Mapping

⚠️ Obsolete

Mapping/Formatting is a way to get values from Skript Variable or conversely how to >make json from Skript Variable

Mapping

   set {_json} to json from "{'A': true, 'B': 'Test', 'C': {'Another': 'player'}}"
   map {_json} to {_json::*}

   send {_json::C::Another}
   # returns player

Formatted

   set {_format::test} to false
   set {_format::test2::username} to "Jakub"
   set {_format::test2::password} to "Some"

   send {_format::*}'s form
   # returns {"test": false, "test2": {"username": "Jakub", "password": "Some"}}
Clone this wiki locally