Open fgrande opened 1 week ago
PR #2475
writing the expression like below should work
res.body?.['life-span']?.begin
@lohxt1 I confirm it works, thanks a lot for the hint. Actually it works also as "res.body['life-span'].begin" Anyway, wouldn't it be nice to write it in a simpler way ?
I have checked the following:
Describe the bug
Asserting a field that contains an hyphen in its name result in an error. For instance, in the associated bru file, the assert
res.body.life-span.begin: eq "1989"
result in a problem, since "life-span" is not a valid js fieldname
Trying to attach a PR that would solve the issue
.bru file to reproduce the bug
MusicBrainz JSON.bru.zip
Screenshots/Live demo link