title: Retrieving String value from Parse Table
body: <p>This should be fairly simple. I have a class called "Inventory". I have two important columns. "productName" and "productPrice". I need to get the productPrice based on the productName. How would I query for the name and then retrieve the associated price? The String is always returned as null.</p>
  
  <p><strong>Update:</strong></p>
  
  <pre><code> @Override
      public String getCost() {
          final String[] productValue = {null};
          ParseQuery&lt;ParseObject&gt; query = new ParseQuery&lt;ParseObject&gt;
          query.whereEqualTo("productName", Capris);
          query.findInBackground(new FindCallback&lt;ParseObject&gt;() {
              public void done(List&lt;ParseObject&gt; list, ParseException e) {
                  if (e == null) { //no exception, hence success
                      productValue[0] = list.get(0).getString("productPrice");
                  }
              }
          });
          return productValue[0];
      }
  </code></pre>
  
  <p>This is more or less what I now have. Is there a better way to return a string? It's still coming back as null. I just need to return the value from the query.</p>
  
  <p><strong>Working Answer:</strong></p>
  
  <p><a href="https://stackoverflow.com/questions/33705660/returning-string-from-parse-com-query">Returning String from Parse.com query</a></p>
  
  <p>This was resolved in another question. In above code productValue[0] may be null as its an aysnc call So replace findInBackground with find()</p>