I have gone through the angularjs
$location guide on how to use $location.search({a: 'b'}) for setting the query parameters for the current window location.
It works fine for single level parameters.
For Example $location.search({'bob': 'marley'}) == some/base/url/?bob=marley
The problem arises when I want to make a multi-level query parameters.
For example $location.search({'musician': {'bob': 'marley'}}) == some/base/url/?musician=%5Bobject%20Object%5D
Whereas I would want some thing like some/base/url/?musician%5Bbob%5D=marley
Is there something that I am doing wrong or is it an angular js bug?
If it is a bug then is there any other way to generate a multi level query parameters which has nested array and hashes?