object inside javascript object [closed]

0

Can you give me a basic example of how it's done in the image below?

  

Ineedtonestinformationobtainedthroughtheobter_conta_mefunctionthrough of this code (click here) , before the $('[name="id"]').val(tbl_lancamento.id); line %

    
asked by anonymous 29.06.2017 / 20:37

1 answer

3

Very simple, just declare one object inside another.

var conta = {
  ag: '0000',
  banco: {
    cod: 033,
    id: 9,
    nome: 'Santander'
  }
}

Simple documentation: link

    
29.06.2017 / 20:42