We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I find that the Delete function does not correctly delete all matches from an array Example below does not delete all where make = "Audi". Delphi 10.3 procedure MyProc: TObject); var FilterJSON: ISuperObject; begin FilterJSON := XSuperobject.SO('{ Vehicles: [ '+ ' { '+ ' make: "Audi", ' + ' model: "A2", ' + ' type: "Saloon", '+ ' price: 12300' + ' }, '+ ' { '+ ' make: "Audi", ' + ' model: "A4", ' + ' type: "Saloon", '+ ' price: 19800' + ' }, '+ ' { '+ ' make: "Audi", ' + ' model: "A6", ' + ' type: "Saloon", '+ ' price: 24000' + ' }, '+ ' { '+ ' make: "Ford", ' + ' model: "Sierra", ' + ' type: "Saloon", '+ ' price: 16500' + ' }, '+ ' { '+ ' make: "Ford", ' + ' model: "Transit", ' + ' type: "Van", '+ ' price: 25000' + ' }, '+ ' { '+ ' make: "Nissan", ' + ' model: "Qashqai", ' + ' type: "Saloon", '+ ' price: 22000' + ' } '+ ' ] '+ '}'); Mmo.Lines.Add( FilterJSON.A['Vehicles'].Delete(function(Arg: IMember): Boolean begin with Arg.AsObject do Result := (S['make'] = 'Audi') end).AsJSON(true) );
end;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I find that the Delete function does not correctly delete all matches from an array
Example below does not delete all where make = "Audi". Delphi 10.3
procedure MyProc: TObject);
var
FilterJSON: ISuperObject;
begin
FilterJSON := XSuperobject.SO('{ Vehicles: [ '+
' { '+
' make: "Audi", ' +
' model: "A2", ' +
' type: "Saloon", '+
' price: 12300' +
' }, '+
' { '+
' make: "Audi", ' +
' model: "A4", ' +
' type: "Saloon", '+
' price: 19800' +
' }, '+
' { '+
' make: "Audi", ' +
' model: "A6", ' +
' type: "Saloon", '+
' price: 24000' +
' }, '+
' { '+
' make: "Ford", ' +
' model: "Sierra", ' +
' type: "Saloon", '+
' price: 16500' +
' }, '+
' { '+
' make: "Ford", ' +
' model: "Transit", ' +
' type: "Van", '+
' price: 25000' +
' }, '+
' { '+
' make: "Nissan", ' +
' model: "Qashqai", ' +
' type: "Saloon", '+
' price: 22000' +
' } '+
' ] '+
'}');
Mmo.Lines.Add(
FilterJSON.A['Vehicles'].Delete(function(Arg: IMember): Boolean
begin
with Arg.AsObject do
Result := (S['make'] = 'Audi')
end).AsJSON(true)
);
end;
The text was updated successfully, but these errors were encountered: