Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

144
Vistas
How to read a c# server side value in jquery

I've a JArray response value like below

{[
  {
    "id": "90b254dc-3fcd-4e7c-9943-59bce366ccdc",
    "invoice_number": "510002500007368" 
  }
]}

i'm getting this value from c# class ..when I try to read in jQuery like below ways

  var tmp = '@Model.Transactions';
    var tmp = Model.Transactions;
    var tmp = @Model.Transactions;

from that I'm getting the values like below image ... i need a structured values. let me know if any idea.. thanks

Response Value Image

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You need to render it in a "raw" manner like this, without escaping or encoding so it will remaing "correct" JSON:

var tmp = @:Model.Transactions;

You can also for example prepare your JSON string in the controller e.g. Model.MyJson then use @:Model.MyJson in the view (notice : after @).

This is shortcut for @Html.Raw(myJson);

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda