I do not think you should build the oData URL on your own, rather make use of SAPUI5 APIs. I am assuming that you are using SAPUI5.
You can create a filter instance using belowAPIs and use this instance while binding or making oData call.
How to use it