I'm trying to get the value "0" back when there's nothing written in the spreadsheet cell whose data I get returned as JSON in an API call. But the output is always undefined. I tried using if else, but it didn't work.

$(function() {
$.getJSON("https://sheets.googleapis.com/v4/spreadsheets/10Ct44JBW-CyoApJXIV87jeVU3Rr-fiLTdoTIJdbSwG8/values/page!A1:C3?key=AIzaSyArRlzwEZHF50y3SV-MO_vU_1KrOIfnMeI", function(result) {
$.each(result.values, function(i, field) {
$(".guide").append('<span class="field1">' + field[0] + '</span><br><span class="field2">' + field[1] + '</span><br><span class="field3">' + field[2] + '</span><br>');
});
});
});
.field1 {
font-size: 12px;
color:green;
}
.field2 {
font-size: 14px;
color:blue;
}
.field3 {
font-size: 18px;
color: red;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<div class="guide"></div>