I have a getJSON call to a php function that returns all items in a column by the column name. This is the PHP function.
public function getCertsByCategory($certCategory) {
$connection = $this -> connect();
return $this -> select("select '.$certCatogory.' from cert_catalog");
}
This is the function to get the data:
function CertName(certCategory) {
$('#certificationName').empty();
console.log(certCategory);
$.getJSON('json_data.php', { method: 'getCertsByCategory', certCategory: certCategory }, function(data) {
console.log(data);
$.each(data, function(key, value) {
console.log(value);
$('#certificationName').append('<option value="' + value + '">' + value + '</option>');
});
});
}
Why am I getting back two dots for the values? This is what it looks like in chrome developer tools.
10: Object
..: ".."
__proto__: Object
11: Object
..: ".."
__proto__: Object