need to add a word to a div if a certain object value is true
<p>Okay, so I'm parsing some data from a webservice here. 
I'm just throwing in a bunch of values from a json object into html, however! i need to check if a certain json value is set to true or false. If so, i need to remove/add a word.</p>

<p>So i basicly i need to get a bunch of prices out. That's easy</p>

<pre><code>    $.each(data.d, function (i, service) {
            $(".services").append('&lt;li class="classes here"&gt;&lt;p class="servicePrice"&gt;'+service.Price+' kr&lt;/p&gt;&lt;div class="serviceNames"&gt;' + service.Name +'&lt;br /&gt;' + service.FirstAvailableSlot + '&lt;/div&gt;

});
</code></pre>

<p>Now! i have to check for this value called FromPrice in the JSON object. And if that is true, then the word 'fra' should be added to the beginning of the the p tag with the class servicePrice.</p>

<p>Now, i certainly can't do it like this.</p>

<pre><code>$.each(data.d, function (i, service) {
                if (service.PriceFrom == false) { $('.servicePrice').prepend('fra '); };
                $(".services").append('&lt;li class="classes here"&gt;&lt;p class="servicePrice"&gt;'+service.Price+' kr&lt;/p&gt;&lt;div class="serviceNames"&gt;' + service.Name +'&lt;br /&gt;' + service.FirstAvailableSlot + '&lt;/div&gt;

    });
</code></pre>

<p>That's just gonna add the word a whole bunch of times depending on how many loops we go through.</p>

<p>i've tried doing it the whole if thing inside the servicePrice tag. But that just gave me a whole lot of javascript parse errors.</p>

<p>Anyone wanna throw this guy a bone?</p>
