I am working on REST call. Everything works fine but my column contains special character &

So rest call like below works:

http://mydomain/_api/web/lists/GetByTitle('MyList')/Items?$filter=ColumnA eq 'DAD'

But below fails:

http://mydomain/_api/web/lists/GetByTitle('MyList')/Items?$filter=ColumnA eq 'D&D'

I dont want to change my column values now. Any solution?


3 Answers 3


Use something like this:

"http://mydomain/_api/web/lists/GetByTitle('MyList')/Items?$filter=ColumnA eq " + encodeURIComponent("D&D")

Perhaps try putting the encoded value in directly. Have you tried something like this yet:

"http://mydomain/_api/web/lists/GetByTitle('MyList')/Items?$filter=ColumnA eq 'D%26D'"

encodeURIComponent should work. I have been using this method and it always works for me. You have to add D&D in quotes.

Try below URL. Just a little modification from @Gennady G's URL(i.e. quotes are added around the filter value) :

"http://mydomain/_api/web/lists/GetByTitle('MyList')/Items?$filter=Title eq '" + encodeURIComponent("D&D") + "'"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.