After decoding the nested value like this:
const result1 = fromBER(newReceiptBuffer);
const result2 = fromBER(result1.result.valueBlock.valueBeforeDecodeView);
console.log(result2.result.toJSON());
I get this result. Any idea how to proceed from here?
{
blockName: 'OBJECT IDENTIFIER',
blockLength: 11,
error: '',
warnings: [],
valueBeforeDecode: <omitted hex value 32 characters in length>,
idBlock: {
blockName: 'identificationBlock',
blockLength: 1,
error: '',
warnings: [],
valueBeforeDecode: '',
isHexOnly: false,
valueHex: '',
tagClass: 1,
tagNumber: 6,
isConstructed: false
},
lenBlock: {
blockName: 'lengthBlock',
blockLength: 1,
error: '',
warnings: [],
valueBeforeDecode: '',
isIndefiniteForm: false,
longFormUsed: false,
length: 9
},
valueBlock: {
blockName: 'ObjectIdentifierValueBlock',
blockLength: 9,
error: '',
warnings: [],
valueBeforeDecode: '',
value: '1.2.840.113549.1.7.2',
sidArray: [ [Object], [Object], [Object], [Object], [Object], [Object] ]
},
name: '',
optional: false,
value: '1.2.840.113549.1.7.2'
}