replace string by json object