Inside geth
how could I convert abi object into a string? I want to convert it into string to apply str.replace(/[\r\n]/g, '');
to remove new lines and make it more compact.
myContractCompiled.Array.info.abiDefinition
returns the abi of the contract as:
[{
constant: true,
inputs: [{
name: "id",
type: "string"
}, {
name: "index",
type: "uint256"
}],
name: "get_length",
outputs: [{
name: "",
type: "uint256"
}],
payable: false,
type: "function"
},
...
{
inputs: [],
payable: false,
type: "constructor"
}]
But I am facing with following error when I try to convert abi object into string:
> myContractCompiled.Array.info.abiDefinition.toString()
"[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]"
Thank you for your valuable time and help.