Understand the JSON output format
mainWhen using the --json flag, csv-diff returns a JSON object with the following structure:
added: An array of objects representing rows present in the second file but not the first.removed: An array of objects representing rows present in the first file but not the second.changed: An array of objects representing rows where values differ. Each object contains akey(the value of the unique identifier) and achangesobject mapping column names to an array of[old_value, new_value].
{
"added": [
{ "id": "3", "name": "Bailey", "age": "1" }
],
"removed": [
{ "id": "2", "name": "Pancakes", "age": "2" }
],
"changed": [
{
"key": "1",
"changes": {
"age": ["4", "5"]
}
}
],
"columns_added": [],
"columns_removed": []
}