Level 58
One solution is to encode the JS object as a JSON string and pass it as a query parameter in the URL. In the controller, you can then decode the JSON string back into a PHP array or object.
Here's an example:
// JS code
const myObj = {
key1: "someVal",
key2: "someOtherVal"
};
const url = "{{ route('someRouteAction') }}?data=" + encodeURIComponent(JSON.stringify(myObj));
document.querySelector('a').href = url;
// Controller code
public function someRouteAction(Request $request)
{
$data = json_decode($request->query('data'));
// $data is now an array or object containing the keys and values from the JS object
}