JSFiddle - React, Tailwind, and code Playground

JavaScript

function getRenderParamValue(query){
    customContext = JSON.parse("{\"test\":true,\"geo\":\"\",\"city\":\"Dublin\",\"categoryId\":\"\",\"categoryName\":\"\",\"productId\":\"\"}");
    alert(customContext.city);
    return customContext.query;
}

alert('city: ' + getRenderParamValue('city'));