I have an object as a variable ,so I want to assign this object as an Id my link. I wrote the below code but it does not work.
here is my code :
$(".rooms").each(function(index, element) {
var policy = $(".policy").val();
alert(policy)
$('.search-box2').load('page.html?id=+policy+&debug=true');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<div class="rooms">
<input type="text" value="{ "id" : { "provider" : { "provider_id" : "10", "dmnid" : 2452 }, "NonRefundable" : "false", "id" : "#1#c2ce302a2032435c96a0b80b8dadc5b2@63a517cd8bca4b318ae398e329509f68" } }" class="policy">
</div>