I have following string:
"paramFoo={12}, paramBar={1}, paramFooBar={2713}"
Now, I need to get the values for these 3 params. Is there any way to do that in JavaScript/jQuery and/or AngularJS?
I can only think of:
- Search for 'paramFoo={' and remove it from the string.
- Get position of first '}'
- Get value from chars 0 - (pos from 2.)-1
- Remove chars 0 - (pos from 2.) from string
- [repeat 1-4 two more times]
Im sure, there must be a cleaner way to do that.
Thank you very much!