parse

loads a collection of items from a local source

array parse(array|string data,string type);

Parameters

dataarray|stringthe data to load
typestringoptional, type of data (json, csv, xml), json by default

Returns

arrayan array of loaded items

Example

// parse toolbar from the json array
toolbar.data.parse(data);
 
// parse toolbar from the xml string
toolbar.data.parse(data,"xml");
 
// parse toolbar from the csv string
toolbar.data.parse(data,"csv");

Back to top