Reverted the helper function to getJSONValuebyPath