title: Convert string to float in Objective-C
body: <p>How do I convert a string to a float in Objective-C?</p>
  <p>I am trying to multiply a couple of strings I am getting back from JSON:</p>
  <pre><code>float subTotal = [[[[purchaseOrderItemsJSON objectAtIndex:i] objectAtIndex:j] objectForKey:@&quot;Price&quot;] floatValue];
  
  NSLog(@&quot;%@&quot;, subTotal);
  </code></pre>
  <p>This gives me: <code>(null)</code> in the console.  I know that there is a valid string coming out of that array because I am already using it to display its value in a label.</p>