This code show one of many possible ways for CRUD operations in file which contain JSON structure.
The exact JSON structure which is supported is as follow:
var some_var = [
{
"field1" => 1,
"field2" => "some text"
},
{
...
}
];
Currently, the code support all C(reate), R(ead), (U)pdate and D(elete) operations. In addition, it support checking of unique fields (are they values already used) throught the checkDuplicates method
ToDo