This is my data:
"buffer": {
"type": "Buffer",
"data": [
8,
4,
18,
32,
203,
243,
203,
190,
254,
80,
185,
227,
225,
187,
114,
219,
243,
87,
83,
254,
248,
95,
139,
1,
26,
198,
149,
158,
30,
44,
146,
237,
166,
70,
199,
9,
26,
32,
138,
251,
102,
14,
230,
244,
102,
250,
142,
53,
210,
190,
9,
23,
169,
98,
14,
156,
148,
99,
168,
204,
145,
108,
191,
223,
189,
58,
202,
61,
52,
254
]
},
I want to convert it to a string. So far tried below mentioned things:
- .toString()
- .new String(buffer)
- String.fromCharCode.apply(null, buffer)
- buffer.map(c => String.fromCharCode(c)).join('') etc
Btw I have no access to data since when I try to access data it throws undefined so I pass the complete object which in this case is buffer to parse which is not returning the proper result. It is returning "\b Ì jQßô\f:l{Ê3DZz²ú_¿;t_ ¹ÐÇævËçÕ§MAjHríþ;!/Ýdãi",
Can someone help me with what it is that I am doing wrong?
which is not returning the proper result.So what is the proper result? Those numbers don't look like they'd result in readable ascii.let response = await channel.queryInfo(peer, true);Here's the function call if this helps