B
B
beduin012018-03-28 17:35:19
JSON
beduin01, 2018-03-28 17:35:19

How to implement inequality conditions in JsonAPI?

At the input, I accept:
{"key":"value"}
But now it was indicated that I need to somehow handle the case "select values ​​\u200b\u200bless than\greater than the key". How to implement it normally? Only option comes to mind:
{"key":">value"}
But it looks very clumsy

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lander, 2018-03-28
@usdglander

{"operator":">","field":"key","value":"3"}
I usually use something like this
upd: And your "clumsy" version is not quite clumsy. It's harder to disassemble, but it looks concise.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question