How to convert object to string in react js
var numeroToken = this.getSearchParams();
getSearchParams(k){
var p={};
location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(s,k,v){p[k]=v})
return k?p[k]:p;
}
I am trying to get the url from getSeatchParms() but it is returned as an object. How can I convert it to a String?
I know this question is out of date, but if someone is looking for the answer (like I was) I could solve it with: JSON.stringify(myObj)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With