Búsquedas recientes


No hay búsquedas recientes

How to read the assets json file.

Respondidas


Publicado 23 mar 2023

I have added json file in assets folder. 

File Name: Client_Config.json

{
    "ClaimStatus":"Claim Status",
    "InitiateNonQualified":"Initiate Non - Qualified Death Claim"

}

How to load these file in Script.js or forms.hbs and get the value of "ClaimStatus" ??


0

5

5 comentarios

Hi Vishwanath,
 
This wouldn't be a Zendesk specific process to implement. Essentially, with the 2nd option you'd want to look at using a backend database where you could store the information you want to access, then fetch the data by making a call to the database API in your script.js file. A quick Google search should return some good resources that will get you moving in the right direction. 

0


Hi Tipene,

Could you please tell me how to do 2nd options i.e. "could store the data externally and make a call to retrieve it in your script.js file."

 

 

0


Thanks for update!

Unfortunately you can’t render json data uploaded as an asset directly in the script.js or .hbs templates. A couple of options could be to store the data as an object directly in the script.js file and push the data to your templates from there, or you could store the data externally and make a call to retrieve it in your script.js file.

Let me know if you have any questions!

Tipene

0


Hi Tipene,

Yes, I'm referring to the guide help center code editor. 

0


Hi Vishwanath,

Just to clarify, are you referring to the guide help center code editor?

0


Iniciar sesión para dejar un comentario.

¿No encontró lo que buscaba?

Nueva publicación