Q:

Getting undefined values from JavaScript array

I am getting response something like this in the form JavaScript Object 
{
    "result": [
        {
            "invoice_prefix": "INV",
            "maximum_invoice_no": "0009"
        }
    ]
}

I am trying to fetch the value of invoice_prefix and maximum_invoice_no
I have written result[0].maximum_invoice_no but I am getting undefined . 
I have tried a lot of other ways also but still getting undefined . Please help me and give me some hint  

A:

I tried that and it is working as expected. I hope this will be helpful.

let test = {
    "result": [
        {
            "invoice_prefix": "INV",
            "maximum_invoice_no": "0009"
        }
    ]
}

document.getElementById("output").innerHTML = "Maximum Invoice No. : " + test.result[0].maximum_invoice_no;

console.log(test.result[0].maximum_invoice_no);
<p id="output"></p>

