I have this url :
http://test.dev/search?publishing_types%5B%5D=Selling&prop_category%5B%5D=Apartment+%26+housing&priceFrom=0&priceTo=300000&areaFrom=0&areaTo=300000&yearFrom=1900&yearTo=2017 
In fuction i check full url and i want to add checkbox for that value if exists in url. Any suggesion?
  function existingUrl(fullUrl){
          $('.dataurl').each(function(){
            var hasValue =  fullUrl.indexOf($(this).val());
            if(hasValue != -1)
              this.checked = true;
        });
      }
HTML:
  @foreach($prop_types as $index => $prop_type)
     <p class="customCheckBox no-padding-left">
        <input type="checkbox" class="preventUncheck dataurl" name="publishing_types[]" id="toggle-on{{ $index }}" value="{{ $prop_type }}" >
        <label for="toggle-on{{ $index }}" class="checkboxTitle">{{ $prop_type }}</label>
     </p>
   @endforeach
 
     
    