{
JSON.stringify(
{
selectedFlatRows: selectedFlatRows.map((row) => row.original),
},
null,
2
)
}
In the above function, what is the use of passing null and 2 in the JSON.stringify function?
in this video link, it has been done like this
Second argument of JSON.stringify is the replacer. This means if this value is null or not provided, all properties of the object are included in the resulting JSON string.