random(filename: string): Record<string, any>
Parameter | Type | Description |
fileName | string | The names of the parameter files that are obtained. |
Type | Description |
Record<string, any> | A row of parameters that are randomly obtained. |
import dataset from 'pts/dataset';export default function () {// Parameter file 'test.csv'// name,value// 1,111// 2,222// 3,333const record = dataset.random('test.csv');// Output '{"name":"2","value":"222"}'console.log(JSON.stringify(record));}
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback