Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Question Verificar y cargar un dato dentro de un Json

Discussion in 'Scripting' started by Tewasaby, Jun 17, 2021.

  1. Tewasaby

    Tewasaby

    Joined:
    Dec 30, 2018
    Posts:
    6
    Buenas tardes, quiero preguntar si hay alguna forma de cargar un dato guardado dentro de una cadena Json guardada bajo alguna llave. y si se puede verificar si la llave existe o no?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,780
    Google tells me:

    Good afternoon, I want to ask if there is any way to load a data saved within a Json string saved under some key. and if it can be verified if the key exists or not?

    I think you want this:

    https://docs.unity3d.com/ScriptReference/PlayerPrefs.HasKey.html

    If it is not that, then perhaps you are looking for the Dictionary.Contains() method?
     
  3. Tewasaby

    Tewasaby

    Joined:
    Dec 30, 2018
    Posts:
    6
    muchas gracias !!
     
    Kurt-Dekker likes this.