-4

From the below command: __qubit.deliver.cookie.v1.get('_qb_se')

I retrieve something like:

{
  610333: {
            e:106949
            t:1533657574344
          },
   686672: {
            e:118370
            t:1533657574344
           },
   704213: {
            e:121077
            t:1533657574344
           },
   738557: {
            e:126419
            t:1533657574344
           }, 
   755358: {
            e:128988
            t:1533657574344
           }, 
   780710: {
            e:132748
            t:1533657574344
           }
    }

I want to be able to access the key (eg 610333) and also the e (eg 106949).

How can each value in different variables?

Thanks,

ChrisF
  • 134,786
  • 31
  • 255
  • 325

1 Answers1

2
var object = __qubit.deliver.cookie.v1.get('_qb_se')
var x = object["610333"] // { e: 106949, t: 1533657574344 }
var e = object["106949"].e // 106949

See Working with Objects.

Xander
  • 1,606
  • 15
  • 30
  • @Maf if you want all the keys use `Object.keys(object)` this will return an array of keys which you can then incorporate into the above example. – Get Off My Lawn Aug 07 '18 at 17:05