A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.dhtmlx.com/suite/data_collection/api/datacollection_parse_method/ below:

Website Navigation


JavaScript DataCollection - parse Method

parse()

loads data from a local data source

parse(data: object[] | string, driver?: object | string): void;

Parameters:

Example

const dataset = [
{
"value": "Ben",
"short": "Ben is a very cautious 5-year-old Siberian Husky.",
"thumbnailName": "01.jpg"
},
{
"value": "Izzy",
"short": "This is our most beloved kingfisher bird Izzy.",
"thumbnailName": "02.jpg"
},
{
"value": "Momo",
"short": "Momo is a 25-year-old elephant with a big heart.",
"thumbnailName": "03.jpg"
}
]

const dataview = new dhx.DataView("dataview_container");

// loads data into the dataview from the JSON array
dataview.data.parse(dataset);

info

Please note that if you specify the id fields in the data collection, their values should be unique. You can also omit the id fields in the data collection. In this case they will be generated automatically.

Related sample: Data. Parse


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4