JSON_Instance Flashcards
1
Q
How to initialize?
A
var myJSON = new JSON_Instance()
2
Q
Inserting OLD but validated JSON
A
myJSON.insertJSON(str)
3
Q
Adding 2d Array
A
myJSON.addToObj(<2dArray>) //eg [['name', 'sam'], ['age', '22'], ['job', 'student']]
4
Q
Remove Item in innerArray by Index
A
myJSON.removeByIndex(indexToRemember)
5
Q
Save to Local Storage
A
myJSON.saveToLocalStorage(name)
6
Q
Get from Local Storage
A
myJSON.getFromLocalStorage(name, insertToJSON) - if 2nd param is True - JSON is parsed back into Class
7
Q
Print to Console
A
myJSON.print()
8
Q
Return a JSON String - obj as String
A
myJSON.stringMe()
9
Q
Parse the JSON String - string becomes obj
A
myJSON.parseMe()
10
Q
CDN Link
A
https://cdn.jsdelivr.net/gh/pixman92/
JSON_Instance@0.0.3/JSON_Instance.js