p5.Table getObject() Method
The getObject() method of p5.Table in p5.js is used to retrieve all the data in the table as an object. An optional column name can be specified to store all the rows of the table with that column name as an attribute.
getObject( [headerColumn] )
Parameters: This method accepts a single parameter as mentioned above and described below:
- headerColumn: It is a String that denotes the name of the column that should be used as a title for each row object.
Return Value: This method returns an object which contains all the data of the table.
The examples below illustrate the getObject() method in p5.js:
Online editor: https://editor.p5js.org/