I am making a little app that allows me to
POST new reviews to an
- Reviews are simple JSON objects storing a few keys, some strings some integers.
GETall the reviews for a given
productId. It can also
POSTa new review (content comes from JSON body, eg.
productId). Note: There are no validations on the
POSTpreventing to create duplicate reviews.
How it works:
- Table reading data from Google sheets. In this sheet I store all the objects I want to
POST(1 per row). Each row can be selected.
- JSONexplorer is displaying the
GETresult from the
productIdof the selected review.
- Button to
POSTthe selected review.
I would like to set a condition on the button, so that it checks for existing duplicates inside the JSONexplorer response before sending the
POST call. A duplicate is any review object that has the same value for a subset of its keys. If a duplicate is found, the POST call is not sent.
Thanks for your help!