Where to find all the Version bytes to generate Bitcoin forked altcoin addresses? - bitcoin

I have the code below and I see that Litecoin using version byte 48 to generate its address. Is there a version byte list of all Bitcoin forked altcoins? I'm looking to generate Dogecoin addresses and Dash. But wasn't sure what version byte they use. Does such a list exist?

For bitcoin family coins you can use WalletGenerator source code.
For example janin.currency.js#L196
for Litecoin 0x30 in hex equal to 48 in decimal

You can find the list here: https://github.com/walletgeneratornet/WalletGenerator.net/blob/36cefb15c625f86c1427e9a17c2bb8d5140918a4/src/janin.currency.js#L196
You will need to convert the HEX into decimal.
// name, networkVersion, privateKeyPrefix, WIF_Start, CWIF_Start, donate
janin.currency.createCurrency ("2GIVE", 0x27, 0xa7, "6", "R" , "Givewmf4yv8uuHZG6Eb7sm17fJS2Trf6U8"),
janin.currency.createCurrency ("42coin", 0x08, 0x88, "5", "M" , "4Fs42jYtLYrUMfKEXc6arojuhRsnYnerxN"),
janin.currency.createCurrency ("Acoin", 0x17, 0xe6, "8", "b" , "AJvChtExuvLgAor9aw1Xz9bkvJY7JKD9uL"),
janin.currency.createCurrency ("AGAcoin", 0x53, 0xd3, "8", "Y" , "aWg2jDBnecc17UHrDF5Rz5pj1rTqTDTnTH"),
janin.currency.createCurrency ("Alphacoin", 0x52, 0xd2, "8", "Y" , "aAWhiGBDUugXC9ZBvw8CDNQH7KRurjy4Nq"),
janin.currency.createCurrency ("Alqo", 0x17, 0xc1, "7", "V" , "ALF9ykkthT5UwmqdrThMRGb1GNgdCUciHL"),
janin.currency.createCurrency ("Animecoin", 0x17, 0x97, "6", "P" , "AdA5nLS5FtPws6A3BX8aXccbP7fReptdw7"),
janin.currency.createCurrency ("Anoncoin", 0x17, 0x97, "6", "P" , "AS3BvkE4wvsXJpn1bGhQni5vZajthnrWQE"),
janin.currency.createCurrency ("Apexcoin", 0x17, 0x97, "6", "P" , "AdPxUCGLDUhHUTGYftffwFVdxbFy2nkXGX"),
janin.currency.createCurrency ("Auroracoin", 0x17, 0x97, "6", "T" , "AVWH1ZutLd4Y5LPDDj5FkBjbm2Gci4iFx3"),
janin.currency.createCurrency ("Aquariuscoin", 0x17, 0x97, "6", "P" , "ARk4VoaCHDoPDn2dctGizJaHFvXNRiDUDr"),
janin.currency.createCurrency ("Axe", 0x4B, 0xCB, "7", "X" , ""),
janin.currency.createCurrency ("BBQcoin", 0x55, 0xd5, "6", "T" , "bTFFC3Gg2XzQygLxxakHkNM3ravBZby1y9"),
janin.currency.createCurrency ("Biblepay", 0x19, 0xb6, "7", "[TU]" , "BDvP86n4oVsLnFh1tCRXWLgBPK6ZtKrJQa"),
janin.currency.createCurrency ("Bitcoin", 0x00, 0x80, "5", "[LK]" , "15DHZzv7eBUwss77qczZiL3DUEZLjDYhbM"),
janin.currency.createCurrency ("BitcoinCash", 0x00, 0x80, "5", "[LK]" , "15DHZzv7eBUwss77qczZiL3DUEZLjDYhbM"),
janin.currency.createCurrency ("BitcoinDark", 0x3c, 0xbc, "7", "U" , "RWtY5fg9ZQ9tYaPd7WJLgsdae1m1ZfrVRe"),
janin.currency.createCurrency ("Bitcore", 0x00, 0x80, "5", "[LK]" , "1H7fhCsyRfPP8XnJWhezXmi9YNqtBh9xxW"),
janin.currency.createCurrency ("BitcoinGold", 0x26, 0x80, "5", "[LK]" , "GYjahzU24Am88oZco6oFtpNzgwJTp9S4eB"),
janin.currency.createCurrency ("Bitconnect", 0x12, 0x92, "5", "N" , "8Zixqosp1KFejfcVQzTWa2EsPa2VxSgeJX"),
janin.currency.createCurrency ("Birdcoin", 0x2f, 0xaf, "6", "[ST]" , "L97vGT4wRnyyiugHpLXzZzjqueN8YWRdRJ"),
janin.currency.createCurrency ("BitSynq", 0x3f, 0xbf, "7", "V" , "SRtKRZxSjjwb9BXujkmvLfRHiutk7s7VXh"),
janin.currency.createCurrency ("BitZeny", 0x51, 0x80, "5", "[LK]" , "ZxUsfFszPsKdot4XnoZHZcMKg2PPS3NUji"),
janin.currency.createCurrency ("Blackcoin", 0x19, 0x99, "6", "P" , "BFeJrZGyJ6bntd7RLXoNGvdn1HB5AQeiz4"),
janin.currency.createCurrency ("BlackJack", 0x15, 0x95, "[56]", "P" , "9pzHRZkJ4Df3EBiqXhDVgtB2A7FaAq6nnG"),
janin.currency.createCurrency ("BlockNet", 0x1a, 0x9a, "6", "P" , "BhGtBAnfp7EUvbVr7R7uTJyHXF7Kt17wni"),
janin.currency.createCurrency ("BolivarCoin", 0x55, 0xd5, "8", "Y" , "1J1HqJd2CRyacjEkMXxGzWVUYq6XfRqJEP"),
janin.currency.createCurrency ("BoxyCoin", 0x4b, 0xcb, "7", "X" , "9pzHRZkJ4Df3EBiqXhDVgtB2A7FaAq6nnG"),
janin.currency.createCurrency ("BunnyCoin", 0x1a, 0x9a, "6", "P" , "BosRXiiSB6WmiSbvzVAdUjpezCWhqpJGyW"),
janin.currency.createCurrency ("Cagecoin", 0x1f, 0x9f, "6", "Q" , "DjUXeu9pUYq5RsN7qpowb1C8LcvPNi9Bx3"),
janin.currency.createCurrency ("CampusCoin", 0x1c, 0x9c, "6", "Q" , "Cawn4BSvSuPFHk3wo43Nm85CG8TW1Y2s1H"),
janin.currency.createCurrency ("CanadaeCoin", 0x1c, 0x9c, "6", "Q" , "CbaoyW9KYP8qQHb9Lu59crvjemryCD88Hv"),
janin.currency.createCurrency ("CannabisCoin", 0x1c, 0x9c, "6", "Q" , "Cb7SSkHpnk1PwKqKbreMALzJpnmAsBNvnG"),
janin.currency.createCurrency ("Capricoin", 0x1c, 0x9c, "6", "Q" , "CS1mBL1dyCR8jH5hRrQiZ4Xz37UWwcbUAJ"),
janin.currency.createCurrency ("CassubianDetk", 0x1e, 0x9e, "6", "Q" , "DBPagysmjfdkND4Zp1SM4myLenNfXpFWnG"),
janin.currency.createCurrency ("CashCoin", 0x22, 0xa2, "6", "[QR]" , "F3bkQC7xGZZcPFmsucYas7KuHoEwCPtGHC"),
janin.currency.createCurrency ("Catcoin", 0x15, 0x95, "[56]", "P" , "9rEXDemG6S3k2ddAsKFzRpnMVz3bVryYXZ"),
janin.currency.createCurrency ("ChainCoin", 0x1c, 0x9c, "6", "Q" , "Ca62ZnR3sfKotqDJzsBW6k75rTFFgFkw1x"),
janin.currency.createCurrency ("ColossusCoinXT", 0x1e, 0xd4, "5", "[LK]" , "D9buTahK9CXNxoGzXLZ9tamwrQzdW2MzvG"),
janin.currency.createCurrency ("Condensate", 0x3c, 0xbc, "7", "U" , "RRZZMHaYZXCeUWRVeRvttKCNcvTRCxBfqD"),
janin.currency.createCurrency ("Copico", 0x1c, 0x90, "5", "N" , "CKWBhVUwQP4fRw6xJk4nxCqKYCMz74bPKr"),
janin.currency.createCurrency ("CopperCoin", 0x1c, 0x9c, "6", "Q" , "CXh8p64WqmEwTkQSDk9azaZUqrnXE9WESV"),
janin.currency.createCurrency ("Corgicoin", 0x1c, 0x9c, "6", "Q" , "CNwV11TaKrfB3TnBS8vQjNbWT6CNxV8GBi"),
janin.currency.createCurrency ("CryptoBullion", 0x0b, 0x8b, "5", "M" , "Cd9CgzTChm9yJQZ3SL3PUSsMkEEN8LGwCF"),
janin.currency.createCurrency ("CryptoClub", 0x23, 0xa3, "6", "R" , "FKPFTw5LjoeGTZP1d3zHLfZNm91FktgPWY"),
janin.currency.createCurrency ("Cryptoescudo", 0x1c, 0x9c, "6", "Q" , "Cd9CgzTChm9yJQZ3SL3PUSsMkEEN8LGwCF"),
janin.currency.createCurrency ("Cryptonite", 0x1c, 0x80, "5", "[LK]" , "CP6uhgcDnXzdgQhnz2q1xhSFMFinmqkQkh"),
janin.currency.createCurrency ("CryptoWisdomCoin", 0x49, 0x87, "5", "[LM]" , "WYeSz9KmpjgdtycPiJVPcQdp7bBqECfr3W"),
janin.currency.createCurrency ("C2coin", 0x1c, 0x9c, "6", "Q" , "Cd3kyj77p2zivnqbcoBzNya7LD1w7uUU9v"),
janin.currency.createCurrency ("Dash", 0x4c, 0xcc, "7", "X" , "XdYX6AbDzjb3AVL1tAmWjuYMD28LD9fcWS"),
janin.currency.createCurrency ("DeafDollars", 0x30, 0xb0, "6", "T" , "LNHYnoqySwoN5aMyEVavEBT3CxHA9WrTZs"),
janin.currency.createCurrency ("DeepOnion", 0x1f, 0x9f, "6", "Q" , "DhUAMCqydnYNx9PmeQ1wnyeyAxi477DbTz"),
janin.currency.createCurrency ("Deutsche eMark", 0x35, 0xb5, "7", "T" , "Ni4112Tmv1ScZ9fkN76knJ4jRTxeHQieJM"),
janin.currency.createCurrency ("Devcoin", 0x00, 0x80, "5", "[LK]" , "1GUeBfpVhN7xySQej3HiSe5c8jQoVQPosv"),
janin.currency.createCurrency ("DigiByte", 0x1e, 0x9e, "6", "Q" , "D9s71nQPBCEbM2SvGwHQcrhay6KrJaVo3Z"),
janin.currency.createCurrency ("Digitalcoin", 0x1e, 0x9e, "6", "Q" , "D7fJwPfW4dFSJNq4NHbMiYJhYnrZehMpqx"),
janin.currency.createCurrency ("Dimecoin", 0x0f, 0x8f, "5", "N" , "7CRKjq135uBC2FgatpAzoJFLPRGL9gCqVp"),
janin.currency.createCurrency ("DNotes", 0x1f, 0x9f, "6", "Q" , "DqmNyJd9xiaNpE65meAYX6EqJCFDwhsQoX"),
janin.currency.createCurrency ("Dogecoin", 0x1e, 0x9e, "6", "Q" , "D74Npoqhwhjw9fShkm5wbj6DD2BJXpmzPj"),
janin.currency.createCurrency ("DogecoinDark", 0x1e, 0x9e, "6", "Q" , "DLbjdRYsfiT62JZf5YxSAfNZJo1VKxDTNP"),
janin.currency.createCurrency ("eGulden", 0x30, 0xb0, "6", "T" , "LhBsKs2GUb24KBAzZfua5AsqfQF5uPdWXQ"),
janin.currency.createCurrency ("eKrona", 0x2d, 0xad, "6", "S" , "KLi8FnMZmSH8EfXYgJwi4R2ZyMscJykXT5"),
janin.currency.createCurrency ("ELECTRA", 0x21, 0xa1, "6", "Q" , "EeJGVF9efipxqJcwf7dup735ATEDc2f1Yk"),
janin.currency.createCurrency ("Ember", 0x5c, 0x32, "2", "8" , "eGFUogU3DceaBgY5a6qBQC22WwYsboG2gw"),
janin.currency.createCurrency ("Emerald", 0x22, 0xa2, "6", "[QR]" , "EnJnzAQSpPp7RshMhNx9zhRnabxTLird6W"),
janin.currency.createCurrency ("Emercoin", 0x21, 0x80, "5", "[LK]" , "EN5nVyEbLrhYfcjoyGgQFtD3QHETyj1dy1"),
janin.currency.createCurrency ("EnergyCoin", 0x5c, 0xdc, "8", "Z" , "eD2P3q5PdyHYNwT94Dg6Wt4pBz64k8gwGf"),
janin.currency.createCurrency ("Espers", 0x21, 0x90, "5", "N" , "EVB5z1zoYYZrjUnGw3fekn1aMjfVhMUKHW"),
janin.currency.createCurrency ("Fastcoin", 0x60, 0xe0, "8", "a" , "frxe8F7gQdiAVgy4mRXjpXH5vN1wyta1db"),
janin.currency.createCurrency ("Feathercoin", 0x0e, 0x8e, "5", "N" , "6dxAP6oacHsove5X2kZPpddcT1Am167YzC"),
janin.currency.createCurrency ("Fedoracoin", 0x21, 0x80, "5", "[KL]" , "ENRPj6iEh14Xky2hv4B7zTJGMe5Kchjeo8"),
janin.currency.createCurrency ("Fibre", 0x23, 0xa3, "6", "R" , "F6qGSM29vJm2q3Q9uvozpym7WYqKXBrpqm"),
janin.currency.createCurrency ("Florincoin", 0x23, 0xb0, "6", "T" , "FLJ7vLPZDLMVr2KPEvZMgWvh8TCXj5Bn3m"),
janin.currency.createCurrency ("Flurbo", 0x23, 0x30, "6", "8" , "FH65pxAbpGjLzjGGfGETSZhgLf2SXGuGBi"),
janin.currency.createCurrency ("Fluttercoin", 0x23, 0xa3, "6", "R" , "FJioRLt3gLtqk3tUdMhwjAVo1sdWjRuwqt"),
janin.currency.createCurrency ("FrazCoin", 0x23, 0xA3, "6", "R" , "F8uHqHrLrToXSMrVVTzap34LBhVSEEWUmm"),
janin.currency.createCurrency ("Freicoin", 0x00, 0x80, "5", "[LK]" , "18kVnAk5Undi7CqEgGx63YDKBPFpxYJmT9"),
janin.currency.createCurrency ("FUDcoin", 0x23, 0xa3, "6", "R" , "FEKsbaLJHjbEnuMiRDvtnyvxaJqehBtQ5V"),
janin.currency.createCurrency ("Fuelcoin", 0x24, 0x80, "5", "[KL]" , "Fq1sL24MgDt7tTiKh8MPvhz2UMP8e1uCo4"),
janin.currency.createCurrency ("Fujicoin", 0x24, 0xa4, "6", "R" , "Fqr2ZrqWPCryqsfjdghwMT3enGHukGonit"),
janin.currency.createCurrency ("GabenCoin", 0x10, 0x90, "5", "N" , "7cwtF11nW4qAGp2pFdLuUZ5gzJWiXtUvi1"),
janin.currency.createCurrency ("Garlicoin", 0x26, 0xb0, "6", "T" , "GdHMURSy1H9NbognUvKNmBXciMnqEpRnjg"),
janin.currency.createCurrency ("GlobalBoost", 0x26, 0xa6, "6", "R" , "GeXdH1WhzA7ayYim9sdCCQKcVukUq1W8LJ"),
janin.currency.createCurrency ("Goodcoin", 0x26, 0xa6, "6", "R" , "GM3kAbQGaMVAYk8U3CrVGhSwz1hZaF6gVM"),
janin.currency.createCurrency ("GridcoinResearch", 0x3e, 0xbe, "7", "V" , "SHs9ESzUL9VAEcq7kStfF1JUAMaNT1EYzJ"),
janin.currency.createCurrency ("Gulden", 0x26, 0xa6, "6", "R" , "GLD7BDBYyddx6Sr72zGfreRG21dJAe74j8"),
janin.currency.createCurrency ("Guncoin", 0x27, 0xa7, "6", "R" , "GwVej6c3tF9GqEdSKmwJiUDWtQVK2wY9fP"),
janin.currency.createCurrency ("HamRadioCoin", 0x00, 0x80, "5", "LK" , "1JQVWKT1NQJUJbbq4UdJUY8DbWmgqrrHWz"),
janin.currency.createCurrency ("HFRcoin", 0x10, 0x90, "5", "N" , ""),
janin.currency.createCurrency ("HOdlcoin", 0x28, 0xa8, "5", "[LK]" , "H9SvPiwASJnsCcNS6QWJc3vi3FxoEHEKVb"),
janin.currency.createCurrency ("HTMLCoin", 0x29, 0xa9, "6", "S" , "HskoM3SRgw3QLV1vHm98cCbFQedHfXZyM2"),
janin.currency.createCurrency ("HyperStake", 0x75, 0xf5, "9", "d" , "p71G6VRVxTTxg3Hqa9CbENeJY1PumBjtvL"),
janin.currency.createCurrency ("ImperiumCoin", 0x30, 0xb0, "6", "T" , "LKcNNWGDyKyedwL8QNsCkg2122fBQyiDat"),
janin.currency.createCurrency ("IncaKoin", 0x35, 0xb5, "7", "T" , "NdEXATr2NSG1pkzC2kScnEnj6g3KYpLnT9"),
janin.currency.createCurrency ("IncognitoCoin", 0x00, 0x80, "5", "LK" , "1BbRmhGKyKshFge9kBMdfJyQr3KZoh5K5t"),
janin.currency.createCurrency ("Influxcoin", 0x66, 0xe6, "8", "b" , "i83eN9HxFvfsxSwjXiZQZaWf13cWF25K9Y"),
janin.currency.createCurrency ("Innox", 0x4b, 0xcb, "7", "X" , "XQm6Vy2tTh87ZnWg6cBdZBmYVExbVuScBF"),
janin.currency.createCurrency ("IridiumCoin", 0x30, 0xb0, "6", "T" , "LKTu2strS8zV1mDJxJtgE3HLqChD2m54yN"),
janin.currency.createCurrency ("iCash", 0x66, 0xcc, "7", "X" , "iKCghTCFEPhriPxrduWxks2SCDE1XKzCU6"),
janin.currency.createCurrency ("iXcoin", 0x8a, 0x80, "5", "[LK]" , "xnF1nshqFLaVdDGBmQ4k2jBQkr8nbuCkLz"),
janin.currency.createCurrency ("Judgecoin", 0x2b, 0xab, "6", "S" , "JbF9ZnvoFkBdasPEq21jCCTnTUDSiyWrAQ"),
janin.currency.createCurrency ("Jumbucks", 0x2b, 0xab, "6", "S" , "JSzHiaoD6ewtymBMJHsHqkpFzCYKBzxJeC"),
janin.currency.createCurrency ("KHcoin", 0x30, 0xb0, "6", "T" , "LZWM2nptWZpSDZna5k96Rk1uqN8NDTigvK"),
janin.currency.createCurrency ("KittehCoin", 0x2d, 0xad, "6", "S" , "KQkaGcgZvbKXoNWaPh5upwUMvEVvvEY5tY"),
janin.currency.createCurrency ("Lanacoin", 0x30, 0xb0, "6", "T" , "LhqrrTHtfNMn8rZi7QesFbbpJYeGWX7319"),
janin.currency.createCurrency ("Latium", 0x17, 0x80, "5", "[LK]" , "ASz2EgegeXfKyHaY1SbJ6nCDK6sxd7BpXg"),
janin.currency.createCurrency ("LBRY Credits", 0x55, 0x80, "5", "[LK]" , "bTLCuxhV5m6DK9yPmADz9H23PyoaQo84KP"),
janin.currency.createCurrency ("Litecoin", 0x30, 0xb0, "6", "T" , "LiScnsyPcqsyxn1fx92BcFguryXcw4DgCy"),
janin.currency.createCurrency ("LiteDoge", 0x5a, 0xab, "6", "S" , "daaV1gQ63HpHHn4Ny1fJZHMA7KCeUVE538"),
janin.currency.createCurrency ("LoMoCoin", 0x30, 0xb0, "6", "T" , "LSdeGMxfMFX38GHCFQT65SJaU1E8ezT2og"),
janin.currency.createCurrency ("MadbyteCoin", 0x32, 0x6e, "4", "H" , "MCBdZDK326yhGM77nWjj3vHX96edd2PQW3"),
janin.currency.createCurrency ("MagicInternetMoney", 0x30, 0xb0, "6", "T" , "LPRqCTYEy53FkEzhRTCauLc7Qq23Z5mxZU"),
janin.currency.createCurrency ("Magicoin", 0x14, 0x94, "5", "[NP]" , "9H6ddyu9S9gyrEHxVrpMBTBZWrwAvdtehD"),
janin.currency.createCurrency ("Marscoin", 0x32, 0xb2, "6", "T" , "M8caDttyKt2r7V7WHMMkRZ1jEzxj16fgCn"),
janin.currency.createCurrency ("MarteXcoin", 0x32, 0xb2, "6", "T" , "M8DSVG13j3qpNDRbuuUBh5juQmSd15wLXH"),
janin.currency.createCurrency ("MasterDoge", 0x33, 0x8b, "5", "M" , "Mm4Xqy9FYZ8N1NJzuXCaJLZcw8o2cmVC7c"),
janin.currency.createCurrency ("Mazacoin", 0x32, 0xe0, "8", "a" , "MLUXCv3GfNgmUSXc5Ek3ePaQ4cfsJwEXHa"),
janin.currency.createCurrency ("Megacoin", 0x32, 0xb2, "6", "T" , "MPeVmJHvkXN3caneWCB5zGgtGHRRBSLmWd"),
janin.currency.createCurrency ("MintCoin", 0x33, 0xb3, "[67]", "T" , "MdT7t7MhbgQLSdMhHJCyoGHUuniqZDrj4h"),
janin.currency.createCurrency ("MobiusCoin", 0x00, 0x80, "5", "[LK]" , "1HKNrUR3BaFC8u4VMfnjCuXDPrYGh7jU8S"),
janin.currency.createCurrency ("MonetaryUnit", 0x10, 0x7e, "5", "K" , "7gzstwRu4owvwk7Se5pPVG8A5pgdgsDzUV"),
janin.currency.createCurrency ("Monocle", 0x32, 0xb2, "6", "T" , "M9CFHZjyCipuKqByD5K1sCHmt7etuCFGsc"),
janin.currency.createCurrency ("MoonCoin", 0x03, 0x83, "5", "L" , "2P2V9npcK7apbUFsWN3zL7R6ARBMwTJ4hA"),
janin.currency.createCurrency ("Myriadcoin", 0x32, 0xb2, "6", "T" , "MWGDtjDw9c8C6zicDQF22yZBWbEX53v4o9"),
janin.currency.createCurrency ("NameCoin", 0x34, 0x80, "5", "[LK]" , "NASxLK4nt5hgX9wQEny5qPPJ2q4uSGCvT9"),
janin.currency.createCurrency ("Navcoin", 0x35, 0x96, "6", "P" , "NP2wVKjiT1PbpkFMCfkSxR7QsV3iezf4T6"),
janin.currency.createCurrency ("NeedleCoin", 0x35, 0xb5, "7", "T" , "NYtEDYHNabMqiad5J2tEPFwE9wnhJQpN1W"),
janin.currency.createCurrency ("NEETCOIN", 0x35, 0xb5, "7", "T" , "NgTALUftFyFk8osvqo5TryBkeNYKvGBssp"),
janin.currency.createCurrency ("NYC", 0x3c, 0xbc, "7", "U" , "RY1XJPWksA5zUTCNJ416XJhY9yiFSFfTvz"),
janin.currency.createCurrency ("Neoscoin", 0x35, 0xb1, "6", "T" , "NZw6WJPiKYcXxua1VveieihiNJRYanHjrP"),
janin.currency.createCurrency ("Nevacoin", 0x35, 0xb1, "6", "T" , "NQDJrKGP3TNhKhKzaHMdg1Wk9FWCT4Nx3q"),
janin.currency.createCurrency ("Novacoin", 0x08, 0x88, "5", "M" , "4EZMrEA5LnmwtcK5b2JfCq9k5YS4ZVZrtT"),
janin.currency.createCurrency ("Nubits", 0x19, 0xbf, "7", "V" , "BPWCkyaVqWdaf3uqahrgdTjB2QTnRZzPMM"),
janin.currency.createCurrency ("Nyancoin", 0x2d, 0xad, "6", "S" , "KHRsf8ofFYqGm4XoeHuFakKPLs5CH2dhK3"),
janin.currency.createCurrency ("Ocupy", 0x73, 0xf3, "9", "[cd]" , "ocLKVPkQRFtKn5mFygrd4QJG9eZd1sKTyi"),
janin.currency.createCurrency ("Omnicoin", 0x73, 0xf3, "9", "[cd]" , "oMesh62joeab2yMoJUH28mGE8h2suDzcYc"),
janin.currency.createCurrency ("Onyxcoin", 0x73, 0xf3, "9", "[cd]" , "odRRCGXooJvKs7cn7sax1bJv9EJwwEy94Z"),
janin.currency.createCurrency ("PacCoin", 0x18, 0x98, "6", "P" , ""),
janin.currency.createCurrency ("Particl", 0x38, 0x6c, "4", "[HG]" , ""),
janin.currency.createCurrency ("Paycoin", 0x37, 0xb7, "7", "U" , "PV2t9zzj9rQm81c9VJqqL8edj1ndpcW9HD"),
janin.currency.createCurrency ("Pandacoin", 0x37, 0xb7, "7", "U" , "PT6guZjCgsrBkqCUhTnG1NNBYBqgzo8gVv"),
janin.currency.createCurrency ("ParkByte", 0x37, 0xb7, "7", "U" , "PCLozfQ5cBinqdRFGEf6DkuC56YU1jWzMQ"),
janin.currency.createCurrency ("Peercoin", 0x37, 0xb7, "7", "U" , "PSnwUwknbmqUU1GCcM1DNxcANqihpdt3tW"),
janin.currency.createCurrency ("Pesetacoin", 0x2f, 0xaf, "6", "[ST]" , "L6qoz2SQN6U9vGNoST35QP85PQbg4s5rDn"),
janin.currency.createCurrency ("PHCoin", 0x37, 0xb7, "7", "U" , "P9e6c714JUHUfuBVHSS36eqaxGCN6X8nyU"),
janin.currency.createCurrency ("PhoenixCoin", 0x38, 0xb8, "7", "U" , "PsaaD2mLfAPUJXhMYdC1DBavkJhZj14k6X"),
janin.currency.createCurrency ("PiggyCoin", 0x76, 0xf6, "9", "d" , "pqXotCKo6mmtYtLY5mi9uEW22mPFgKoLvx"),
janin.currency.createCurrency ("Pinkcoin", 0x3, 0x83, "[RQP]","L" , "2Xgy8K2n5cVmnm8Se2rDojQ1GdfHdktx8r"),
janin.currency.createCurrency ("PIVX", 0x1e, 0xd4, "8", "Y" , "DSiCurCzgdzqSP1urFg3VZJfrpyhMWjEAp"),
janin.currency.createCurrency ("Peercoin", 0x37, 0xb7, "7", "U" , "PSnwUwknbmqUU1GCcM1DNxcANqihpdt3tW"),
janin.currency.createCurrency ("Potcoin", 0x37, 0xb7, "7", "U" , "PQcMNuCdeooMcS5H3DGwxXnSE2kmyVMU39"),
janin.currency.createCurrency ("Primecoin", 0x17, 0x97, "6", "P" , "AbXChfoHyFESePFuVh1xLZdn7Rj1mfD2a4"),
janin.currency.createCurrency ("ProsperCoinClassic", 0x3a, 0xba, "7", "Q" , "QXLqozFHKP1fdvx4LKMYmtEHWciEZ9pD2F"),
janin.currency.createCurrency ("Quark", 0x3a, 0xba, "7", "U" , "QNGJBwRApKKwEevTvDwpeoSgmo6w6wv8yQ"),
janin.currency.createCurrency ("Qubitcoin", 0x26, 0xe0, "8", "a" , "GeNTNSwEh5ZCRCE6LtnMwHCk8VU2Lu8QE7"),
janin.currency.createCurrency ("Reddcoin", 0x3d, 0xbd, "7", "[UV]" , "RmAB99NsX6Wbjk5WdqNeEab83y72d7zkqZ"),
janin.currency.createCurrency ("Riecoin", 0x3c, 0x80, "5", "[LK]" , "RUsNQFds88sdWszMUVKwfdBhE9PtzLTK6N"),
janin.currency.createCurrency ("Rimbit", 0x3c, 0xbc, "7", "U" , "RJNYNAafwKmkGf1hb3LDXiL1gRhSPPrXxN"),
janin.currency.createCurrency ("ROIcoin", 0x3c, 0x80, "5", "[LK]" , "RKUwWKMfwoq2trvQ4Q3a529U7KZq3Pq6gw"),
janin.currency.createCurrency ("Rubycoin", 0x3c, 0xbc, "7", "U" , "RNsGHZnnr4pa3nYSp5NsuPtqTAGHT6XWqb"),
janin.currency.createCurrency ("Rupaya", 0x3c, 0xbc, "7", "U" , "RENYagTnHvczPgFYaAhfVqh9y6B1yaMaij"),
janin.currency.createCurrency ("Sambacoin", 0x3e, 0xbe, "7", "V" , "SJdiAgazqtum79HzGbNDxi879NzSDjtH5P"),
janin.currency.createCurrency ("SecKCoin", 0x3f, 0xbf, "7", "V" , "Se1aaa5T1HRpMEfyBPGswVUgTQoZUst9jA"),
janin.currency.createCurrency ("SibCoin", 0x3f, 0x80, "5", "[LK]" , "SY7GAzvFVS8bUA89e7hosPMxqMS482ecsp"),
janin.currency.createCurrency ("SixEleven", 0x34, 0x80, "5", "[LK]" , "NGPimZxoZMmAsoF4eJME8TkG7UW8vqoJQJ"),
janin.currency.createCurrency ("SmileyCoin", 0x19, 0x99, "6", "P" , "BEaZDZ8gCbbP1y3t2gPNKwqZa76rUDfR73"),
janin.currency.createCurrency ("SongCoin", 0x3f, 0xbf, "7", "V" , "SSK9MXormZXgF5ZfV599okJRXYh3g9RXGN"),
janin.currency.createCurrency ("SpreadCoin", 0x3f, 0xbf, "7", "V" , "SjPkh7V2KkySjL52wsD2CpEj4quTtjiaVW"),
janin.currency.createCurrency ("StealthCoin", 0x3e, 0xbe, "7", "V" , "SJJGGq7UyoUH1TExGJCQ6ee49ztJr2quF8"),
janin.currency.createCurrency ("Stratis", 0x3f, 0xbf, "7", "V" , "ScMNGH91SpNwbRDeK8vYXXJ3aYpwBr9Pen"),
janin.currency.createCurrency ("SwagBucks", 0x3f, 0x99, "6", "P" , "SJJGGq7UyoUH1TExGJCQ6ee49ztJr2quF8"),
janin.currency.createCurrency ("Syscoin", 0x00, 0x80, "5", "[LK]" , "133miKEHohCR5qnbEZ64MFZkCzFM2HpeAd"),
janin.currency.createCurrency ("Tajcoin", 0x41, 0x6f, "6", "H" , "TWYZCoBw6Kd5fKZ5wWpqgJaeNAbuRF9Qg8"),
janin.currency.createCurrency ("Terracoin", 0x00, 0x80, "5", "[LK]" , "1BQH6gBzkxxyMQG3VSJCHnmVGfWu64nbPL"),
janin.currency.createCurrency ("Titcoin", 0x00, 0x80, "5", "[LK]" , "1CHAo7muicsLHdPk5q4asrEbh6aUeSPpdC"),
janin.currency.createCurrency ("TittieCoin", 0x41, 0xc1, "7", "V" , "TYrdtLy9irV4u1yo2YQVCkS27RzDzBqWwJ"),
janin.currency.createCurrency ("Topcoin", 0x42, 0xc2, "7", "V" , "TmDTsQqqv1LWGw4xjGNiJ7ABwdCenf2BFF"),
janin.currency.createCurrency ("TransferCoin", 0x42, 0x99, "6", "P" , "TbnW6ih8314ksuutJpRjwUbc2mAkz64Tij"),
janin.currency.createCurrency ("TreasureHuntCoin", 0x32, 0xb2, "6", "T" , "MKnC2upgCNfVMS2phkV8SqGaXUGkn39EaX"),
janin.currency.createCurrency ("TrezarCoin", 0x42, 0xC2, "7", "V" , "Tw1jsLJKfmcosUCkJuMevdLLJob9wD7PSE"),
janin.currency.createCurrency ("Unobtanium", 0x82, 0xe0, "8", "a" , "uZ8Gq61NGJ2wz3PLybXyXKLYC1FhRpz8Kq"),
janin.currency.createCurrency ("USDe", 0x26, 0xa6, "6", "R" , "GQTeNSfx6xPbBNsUfqoZNrrCBQXeY5Dtdu"),
janin.currency.createCurrency ("Vcash", 0x47, 0xc7, "7", "W" , "VoaKH8ndxJoFfM3XJ7DK3P6g7kxASpCf5g"),
janin.currency.createCurrency ("Versioncoin", 0x46, 0xc6, "7", "W" , "VRYmn3ABchWK7ZSx2V3VD6TzxmqCLsxJSH"),
janin.currency.createCurrency ("VergeCoin", 0x1e, 0x9e, "6", "Q" , "DJvyiaUdFAH7zmn23SaWzSj9FT5X9a3pSS"),
janin.currency.createCurrency ("Vertcoin", 0x47, 0x80, "5", "[LK]" , "VkmBz8JJWLP1sVH9sGwc1Fz7o5RtXLW4J5"),
janin.currency.createCurrency ("Viacoin", 0x47, 0xc7, "7", "W" , "VeJMvqvsZFoTkYfitzEG8fYy7bC7hxMfT1"),
janin.currency.createCurrency ("VikingCoin", 0x46, 0x56, "3", "D" , "VJXz1cD1mDGQmu52aDdd7Q2G5ejqA6mcqw"),
janin.currency.createCurrency ("W2Coin", 0x49, 0xc9, "7", "W" , "Wa3AvKUP5J3BpEa93nwKHPAAQ2P1XdTCeU"),
janin.currency.createCurrency ("WACoins", 0x49, 0xc9, "7", "W" , ""),
janin.currency.createCurrency ("WankCoin", 0x00, 0x80, "5", "[LK]" , "1CnEFZZxJQkNAvgFGdRV5JEKShkNj1LRWL"),
janin.currency.createCurrency ("WeAreSatoshiCoin", 0x87, 0x97, "6", "P" , "wSEgPsCGqQESLDyzBJkwCXvMP1z3e1Qi3X"),
janin.currency.createCurrency ("WorldCoin", 0x49, 0xc9, "7", "W" , "WNmGkn2WQZKS6xKHEsj5AqSbuE4sh9Upyb"),
janin.currency.createCurrency ("XP", 0x4b, 0xcb, "7", "X" , "XLRykcGjFMpBDQ7PHfamR2DR4Z21qTUBHG"),
janin.currency.createCurrency ("Yenten", 0x4e, 0x7b, "5", "K" , "YStuCpv1U9iT3L1VqBr52B9nBxrNgt4Fpj"),
janin.currency.createCurrency ("Zcash", [0x1c,0xb8], 0x80, "5", "[LK]" , "t1XA64Hw47QaCxCUEgZbc4FVdH811RMd1xp"),
janin.currency.createCurrency ("Zetacoin", 0x50, 0xE0, "8", "a" , "ZRU6TP8NLzoyey4DPPaa3uCCgDNDc96PXJ"),
janin.currency.createCurrency ("Testnet Bitcoin", 0x6f, 0xef, "9", "c" , null),
janin.currency.createCurrency ("Testnet Dogecoin", 0x71, 0xf1, "9", "c" , null),
janin.currency.createCurrency ("Testnet MonetaryUnit",0x26, 0x40, "3", "A" , null),
janin.currency.createCurrency ("Testnet PIVX", 0x8b, 0xef, "9", "c" , null),
janin.currency.createCurrency ("Testnet WACoins", 0x51, 0xd1, "8", "[XY]" , null)

Related

Flatten multiple names arrays within variant json column in snowflake

I have a web scraper dumping data into a variant column in a Snowflake database.
This is acraping page data as then creates json arrays for various tables found within the page.
Here is an example of the type of json i would find using a Soccer analogy:
{
"dom_url": "https://www.soccertables.com/european_tables",
"event_id": "01b2722a-d8e6-4f67-95d0-8dd7ba088a4a",
"event_utc_time": "2020-05-11 09:01:14.821",
"ip_address": "125.238.134.96",
"table_1": [
{
"position": "1",
"team_name": "Liverpool",
"games_played": "29",
"games_won": "26",
"games_drawn": "2",
"games_lost": "1",
"goals_for": "75",
"goals_against": "35"
"points": "80"
},
{
"position": "2",
"team_name": "Man. City",
"games_played": "29",
"games_won": "20",
"games_drawn": "5",
"games_lost": "4",
"goals_for": "60",
"goals_against": "45"
"points": "65"
},
{
"position": "...",
"team_name": "...",
"games_played": "...",
"games_won": "...",
"games_drawn": "...",
"games_lost": "...",
"goals_for": "...",
"goals_against": "..."
"points": "..."
}
],
"table_2": [
{
"position": "1",
"team_name": "Bayern Munich",
"games_played": "29",
"games_won": "26",
"games_drawn": "2",
"games_lost": "1",
"goals_for": "75",
"goals_against": "35"
"points": "80"
},
{
"position": "2",
"team_name": "Bayer Leverkussen",
"games_played": "29",
"games_won": "20",
"games_drawn": "5",
"games_lost": "4",
"goals_for": "60",
"goals_against": "45"
"points": "65"
},
{
"position": "...",
"team_name": "...",
"games_played": "...",
"games_won": "...",
"games_drawn": "...",
"games_lost": "...",
"goals_for": "...",
"goals_against": "..."
"points": "..."
}
],
"referrer_url": "https://www.soccertables.com",
}
Ideally, i'd like the output of this to be a flat, relational table:
table_name position team_name games_played etc...
table_1 1 Liverpool 29 ...
table_1 2 Man. City 29 ...
table_2 1 Bayern Munich 29 ...
....
I know that if i were only interested in table_1 i could do this:
SELECT v.value:position::NUMBER POSITION
, v.value:team_name::STRING TEAM_NAME
, v.value:games_played::NUMBER GAMES_PLAYED
, ...
FROM JSON_TABLE a1, LATERAL FLATTEN(JSON_DATA:table_1) v
and that i could do the same for table_2 and union them, but there can be N possibilities with regards to the table_N placeholder.
I've looked at doing LATERAL FLATTEN multiple times:
SELECT v.value:position::NUMBER POSITION
, v.value:team_name::STRING TEAM_NAME
, v.value:games_played::NUMBER GAMES_PLAYED
, ...
FROM JSON_TABLE a1, LATERAL FLATTEN(JSON_DATA:table_1) v, LATERAL FLATTEN(JSON_DATA:table_2) v2
But this results in duplication of data, and does not allow me to put each tables columns all in a single relational structure.
I'm sure there is something simple that i am missing here, but i've reached a point where i think i've been staring at this too long, and just can';t see it.
Thanks in advance,
S
If you are trying to create a single, flattened view of the table_n data, as well as the attributes of at the first level, then something like this would work.
WITH x AS (
SELECT '{
"dom_url": "https://www.soccertables.com/european_tables",
"event_id": "01b2722a-d8e6-4f67-95d0-8dd7ba088a4a",
"event_utc_time": "2020-05-11 09:01:14.821",
"ip_address": "125.238.134.96",
"table_1": [
{
"position": "1",
"team_name": "Liverpool",
"games_played": "29",
"games_won": "26",
"games_drawn": "2",
"games_lost": "1",
"goals_for": "75",
"goals_against": "35",
"points": "80"
},
{
"position": "2",
"team_name": "Man. City",
"games_played": "29",
"games_won": "20",
"games_drawn": "5",
"games_lost": "4",
"goals_for": "60",
"goals_against": "45",
"points": "65"
},
{
"position": "...",
"team_name": "...",
"games_played": "...",
"games_won": "...",
"games_drawn": "...",
"games_lost": "...",
"goals_for": "...",
"goals_against": "...",
"points": "..."
}
],
"table_2": [
{
"position": "1",
"team_name": "Bayern Munich",
"games_played": "29",
"games_won": "26",
"games_drawn": "2",
"games_lost": "1",
"goals_for": "75",
"goals_against": "35",
"points": "80"
},
{
"position": "2",
"team_name": "Bayer Leverkussen",
"games_played": "29",
"games_won": "20",
"games_drawn": "5",
"games_lost": "4",
"goals_for": "60",
"goals_against": "45",
"points": "65"
},
{
"position": "...",
"team_name": "...",
"games_played": "...",
"games_won": "...",
"games_drawn": "...",
"games_lost": "...",
"goals_for": "...",
"goals_against": "...",
"points": "..."
}
],
"referrer_url": "https://www.soccertables.com",
}' as var)
SELECT
parse_json(x.var):dom_url::string,
parse_json(x.var):event_id::string,
parse_json(x.var):event_utc_time::string,
parse_json(x.var):ip_address::string,
x3.value:games_drawn::string,
x3.value:games_lost::string,
x3.value:games_played::string,
x3.value:games_won::string,
x3.value:goals_against::string,
x3.value:goals_for::string,
x3.value:points::string,
x3.value:position::string,
x3.value:team_name::string
FROM x
,LATERAL FLATTEN(parse_json(x.var)) x2
,LATERAL FLATTEN(X2.VALUE) x3;
The CTE is obviously just to show the example with the sample JSON you provided. If you care about which records came from which table, you can also include x2.key as an element in your SELECT.

Postgres GROUP BY, SUBSTRING and SUM Query Issue

I am trying to write a GROUP BY query but I am struggling to achieve the desired result. I am including
A JSON object that represent the DB table with some data.
SELECT * FROM tb_transaction
"tb_transaction": [
{
"id": "121",
"profile_id": "57",
"event_id": "45",
"activity_id": "67",
"payment_type": "EFT",
"transaction_type": "activity_registration",
"gl_code": "1234-56-102-020",
"description": "Golf",
"amount": "1500",
"paid": "f",
"invoice_number": "0006"
},
{
"id": "117",
"profile_id": "57",
"event_id": "45",
"activity_id": "65",
"payment_type": "EFT",
"transaction_type": "activity_registration",
"gl_code": "1234-56-102-056",
"description": "Cuppa",
"amount": "100",
"paid": "f",
"invoice_number": "0006"
},
{
"id": "120",
"profile_id": "57",
"event_id": "45",
"activity_id": "70",
"payment_type": "EFT",
"transaction_type": "activity_registration",
"gl_code": "1234-13-102-064",
"description": "Nutrition & Lifestyle",
"amount": "510",
"paid": "f",
"invoice_number": "0006"
},
{
"id": "125",
"profile_id": "207",
"event_id": "45",
"activity_id": "65",
"payment_type": "Cash",
"transaction_type": "activity_registration",
"gl_code": "1234-56-102-056",
"description": "Cuppa",
"amount": "100",
"paid": "f",
"invoice_number": "0007"
},
{
"id": "126",
"profile_id": "207",
"event_id": "45",
"activity_id": "65",
"payment_type": "Cash",
"transaction_type": "merchandise",
"gl_code": "3400-56-102-056",
"description": "Cap",
"amount": "20",
"paid": "f",
"invoice_number": "0007"
},
{
"id": "128",
"profile_id": "193",
"event_id": "45",
"activity_id": "70",
"payment_type": "SnapScan",
"transaction_type": "activity_registration",
"gl_code": "1234-13-102-064",
"description": "Nutrition & Lifestyle",
"amount": "510",
"paid": "f",
"invoice_number": "0008"
},
{
"id": "131",
"profile_id": "193",
"event_id": "45",
"activity_id": "65",
"payment_type": "SnapScan",
"transaction_type": "merchandise",
"gl_code": "3400-56-102-056",
"description": "Water Bottle",
"amount": "10",
"paid": "f",
"invoice_number": "0008"
},
{
"id": "130",
"profile_id": "193",
"event_id": "45",
"activity_id": "65",
"payment_type": "SnapScan",
"transaction_type": "activity_registration",
"gl_code": "1234-56-102-056",
"description": "Cuppa",
"amount": "100",
"paid": "f",
"invoice_number": "0008"
}
]
My current query and its result.
SELECT gl_code, transaction_type, activity_id, payment_type, description, SUM(amount) AS amount
FROM tb_transaction
WHERE event_id = 45 AND paid = false
GROUP BY gl_code, transaction_type, activity_id, payment_type, description
ORDER BY gl_code;
"RECORDS": [
{
"gl_code": "1234-13-102-064",
"transaction_type": "activity_registration",
"activity_id": "70",
"payment_type": "EFT",
"description": "Nutrition & Lifestyle",
"amount": "510"
},
{
"gl_code": "1234-13-102-064",
"transaction_type": "activity_registration",
"activity_id": "70",
"payment_type": "SnapScan",
"description": "Nutrition & Lifestyle",
"amount": "510"
},
{
"gl_code": "1234-56-102-056",
"transaction_type": "activity_registration",
"activity_id": "65",
"payment_type": "Cash",
"description": "Cuppa",
"amount": "100"
},
{
"gl_code": "1234-56-102-056",
"transaction_type": "activity_registration",
"activity_id": "65",
"payment_type": "EFT",
"description": "Cuppa",
"amount": "100"
},
{
"gl_code": "1234-56-102-056",
"transaction_type": "activity_registration",
"activity_id": "65",
"payment_type": "SnapScan",
"description": "Cuppa",
"amount": "100"
},
{
"gl_code": "1234-56-102-020",
"transaction_type": "activity_registration",
"activity_id": "67",
"payment_type": "EFT",
"description": "Golf",
"amount": "1500"
},
{
"gl_code": "3400-56-102-056",
"transaction_type": "merchandise",
"activity_id": "65",
"payment_type": "Cash",
"description": "Cap",
"amount": "20"
},
{
"gl_code": "3400-56-102-056",
"transaction_type": "merchandise",
"activity_id": "65",
"payment_type": "SnapScan",
"description": "Water Bottle",
"amount": "10"
}
]
The desired result.
`"RECORDS": [
{
"gl_code": "1234-13-102-064",
"transaction_type": "activity_registration",
"activity_id": "70",
"payment_type": "EFT",
"description": "Nutrition & Lifestyle",
"amount": "510"
},
{
"gl_code": "1234-13-102-064",
"transaction_type": "activity_registration",
"activity_id": "70",
"payment_type": "SnapScan",
"description": "Nutrition & Lifestyle",
"amount": "510"
},
{
"gl_code": "1234-56-102-056",
"transaction_type": "activity_registration",
"activity_id": "65",
"payment_type": "Cash",
"description": "Cuppa",
"amount": "120"
},
{
"gl_code": "1234-56-102-056",
"transaction_type": "activity_registration",
"activity_id": "65",
"payment_type": "EFT",
"description": "Cuppa",
"amount": "100"
},
{
"gl_code": "1234-56-102-056",
"transaction_type": "activity_registration",
"activity_id": "65",
"payment_type": "SnapScan",
"description": "Cuppa",
"amount": "110"
},
{
"gl_code": "1234-56-102-020",
"transaction_type": "activity_registration",
"activity_id": "67",
"payment_type": "EFT",
"description": "Golf",
"amount": "1500"
}
]'
The difference is very subtle. But you will see that I basically want to sum the records who's "payment_type" and last 3 digits of the "gl_code" are the same. For example "payment_type": "Cash" and "gl_code": "1234-56-102-056",
Any help will be immensely appreciated.
If you want to group by payment_type and last 3 digits of gl_code (and apparently some other columns), you can do
SELECT substring(gl_code, length(gl_code) - 3),
transaction_type,
activity_id,
payment_type,
description,
SUM(amount) AS amount
FROM tb_transaction
WHERE event_id = 45 AND paid = false
GROUP BY substring(gl_code, length(gl_code) - 3),
transaction_type,
activity_id,
payment_type,
description
ORDER BY gl_code;
Note however that this will only select the last 3 digits, and not an (arbitrary) gl_code from all those that share the same last 3 digits.

Json lines (.jsonl file) & SQL Server 2016

I’ve been going backwards and forwards over this but stumped. I have a file that has multiple JSON lines in it across multiple objects.
I've put two lines below.
{
"mental_health_act_legal_status":
[
{"legal_status_classification": "16", "start_time": "16:32", "expiry_date": "20171014", "expiry_time": "20:28", "start_date": "20170912"},
{"legal_status_classification": "07", "start_time": "01:31", "expiry_date": "20170922", "expiry_time": "17:53", "start_date": "20170820"},
{"legal_status_classification": "36", "start_time": "00:25", "expiry_date": "20170909", "expiry_time": "18:08", "start_date": "20170801"},
{"legal_status_classification": "18", "start_time": "18:26", "expiry_date": "20170801", "expiry_time": "12:40", "start_date": "20170724"},
{"legal_status_classification": "18", "start_time": "10:26", "expiry_date": "20170801", "expiry_time": "03:07", "start_date": "20170623"},
{"legal_status_classification": "18", "start_time": "04:11", "expiry_date": "20170621", "expiry_time": "12:51", "start_date": "20170601"},
{"legal_status_classification": "17", "start_time": "07:54", "expiry_date": "20170605", "expiry_time": "05:04", "start_date": "20170512"},
{"legal_status_classification": "31", "start_time": "02:41", "expiry_date": "20170520", "expiry_time": "11:14", "start_date": "20170920"},
{"legal_status_classification": "03", "start_time": "23:17", "expiry_date": "20170504", "expiry_time": "06:29", "start_date": "20170925"},
{"legal_status_classification": "05", "start_time": "17:41", "expiry_date": "20170403", "expiry_time": "01:23", "start_date": "20170331"},
{"legal_status_classification": "36", "start_time": "05:05", "expiry_date": "20170322", "expiry_time": "14:30", "start_date": "20170312"},
{"legal_status_classification": "03", "start_time": "03:45", "expiry_date": "20170310", "expiry_time": "11:56", "start_date": "20170213"},
{"legal_status_classification": "01", "start_time": "14:03", "expiry_date": "20170201", "expiry_time": "06:02", "start_date": "20170118"},
{"legal_status_classification": "09", "start_time": "07:07", "expiry_date": "20170121", "expiry_time": "22:15", "start_date": "20170111"}
],
"system": {"record_id": "1484925971009999954", "provider_record_id": "RTD 0167983 0000046", "sus_version": "20170927072844117", "spell_id": "1484925971009999954"}
}
{
"mental_health_act_legal_status":
[
{"legal_status_classification": "15", "start_time": "18:51", "expiry_date": "20170919", "expiry_time": "23:04", "start_date": "20170904"},
{"legal_status_classification": "19", "start_time": "06:11", "expiry_date": "20170908", "expiry_time": "09:17", "start_date": "20170818"},
{"legal_status_classification": "15", "start_time": "20:36", "expiry_date": "20170818", "expiry_time": "07:44", "start_date": "20170723"},
{"legal_status_classification": "01", "start_time": "16:12", "expiry_date": "20170809", "expiry_time": "21:25", "start_date": "20170718"},
{"legal_status_classification": "09", "start_time": "06:06", "expiry_date": "20170707", "expiry_time": "18:10", "start_date": "20170615"},
{"legal_status_classification": "07", "start_time": "11:53", "expiry_date": "20170625", "expiry_time": "14:09", "start_date": "20170527"},
{"legal_status_classification": "19", "start_time": "07:13", "expiry_date": "20170529", "expiry_time": "00:39", "start_date": "20170503"},
{"legal_status_classification": "35", "start_time": "16:01", "expiry_date": "20170521", "expiry_time": "07:18", "start_date": "20170912"},
{"legal_status_classification": "35", "start_time": "02:45", "expiry_date": "20170430", "expiry_time": "06:47", "start_date": "20170902"},
{"legal_status_classification": "03", "start_time": "19:51", "expiry_date": "20170410", "expiry_time": "18:46", "start_date": "20170319"},
{"legal_status_classification": "13", "start_time": "20:58", "expiry_date": "20170310", "expiry_time": "10:52", "start_date": "20170220"},
{"legal_status_classification": "02", "start_time": "13:11", "expiry_date": "20170217", "expiry_time": "00:42", "start_date": "20170127"},
{"legal_status_classification": "15", "start_time": "18:23", "expiry_date": "20170209", "expiry_time": "20:03", "start_date": "20170120"},
{"legal_status_classification": "07", "start_time": "00:59", "expiry_date": "20170119", "expiry_time": "12:33", "start_date": "20161231"}
],
"system": {"record_id": "1484925971009999916", "provider_record_id": "RTD 0167983 0000084", "sus_version": "20170927072844117", "spell_id": "1484925971009999916"}
}
If I use the openjson syntax, I can get it to load a section I want to one of the tables but only one line in the file is loaded; but I need to go through the entire file.
I then looked at a .fmt file from a post here but from what I can tell from using this so far is that the JSON lines all have to be going to the same table. You can’t have multiple objects going to multiple tables in the line or it doesn’t know where to split them.
My code for getting this into SQL, for just two tables covering the system and mental health act legal status is:
DECLARE #JSON NVARCHAR(MAX)
SET #JSON = (SELECT J.*
FROM OPENROWSET
(BULK 'C:\Users\report.jsonl', SINGLE_CLOB)
AS j)
SELECT * FROM OPENJSON (#JSON, '$.system')
WITH ([SUS_VERSION] VARCHAR (255) '$.sus_verion',
[SPELL_ID] VARCHAR (255) '$.spell_id',
[RECORD_ID] VARCHAR (255)'$.record_id',
[PROVIDER_RECORD_ID] VARCHAR (255) '$.provider_record_id'
)
SELECT [record_id], [legal_status_classification], [start_date], [start_time], [expiry_date], [expiry_time]
FROM OPENROWSET (BULK 'C:\Users\report.jsonl', SINGLE_CLOB) AS j
CROSS APPLY OPENJSON (BulkColumn, '$.mental_health_act_legal_status')
WITH (
[legal_status_classification] VARCHAR (255),
[start_time] VARCHAR (255),
[expiry_date] VARCHAR (255),
[expiry_time] VARCHAR (255),
[start_date] VARCHAR (255)
)
CROSS APPLY OPENJSON (BulkColumn, '$.system')
WITH (
[record_id] VARCHAR (255)
)
Is any one able to provide advice or help or what route to look at please.
Thanks
I don't think this is 'well formed JSON' - shouldn't there be a comma at the end if the first line? and shouldn't it be surrounded by square brackets? Did something generate this JSON?
If you take a look at the sample lifted from here: https://learn.microsoft.com/en-us/sql/t-sql/functions/openjson-transact-sql you can see that multiple order records contained in curly braces are seperated by commas and surrounded by square brackets
DECLARE #json NVARCHAR(MAX) = N'[
{
"Order": {
"Number":"SO43659",
"Date":"2011-05-31T00:00:00"
},
"AccountNumber":"AW29825",
"Item": {
"Price":2024.9940,
"Quantity":1
}
},
{
"Order": {
"Number":"SO43661",
"Date":"2011-06-01T00:00:00"
},
"AccountNumber":"AW73565",
"Item": {
"Price":2024.9940,
"Quantity":3
}
}
]'
SELECT *
FROM OPENJSON ( #json )
WITH (
Number varchar(200) '$.Order.Number',
Date datetime '$.Order.Date',
Customer varchar(200) '$.AccountNumber',
Quantity int '$.Item.Quantity',
[Order] nvarchar(MAX) AS JSON
)
You can push data off to different tables. It's not a limitation of OpenJSON, you just need to use staging tables etc to work out how to split it off. I realise this is not really an answer but I will add more detail if you're interested.
I can get multiple rows with this syntax, but only because I added square brackets for an array, and put a comma between the elements:
DECLARE #JSON VARCHAR(MAX);
SET #JSON = '
[{
"mental_health_act_legal_status":
[
{"legal_status_classification": "16", "start_time": "16:32", "expiry_date": "20171014", "expiry_time": "20:28", "start_date": "20170912"},
{"legal_status_classification": "07", "start_time": "01:31", "expiry_date": "20170922", "expiry_time": "17:53", "start_date": "20170820"},
{"legal_status_classification": "36", "start_time": "00:25", "expiry_date": "20170909", "expiry_time": "18:08", "start_date": "20170801"},
{"legal_status_classification": "18", "start_time": "18:26", "expiry_date": "20170801", "expiry_time": "12:40", "start_date": "20170724"},
{"legal_status_classification": "18", "start_time": "10:26", "expiry_date": "20170801", "expiry_time": "03:07", "start_date": "20170623"},
{"legal_status_classification": "18", "start_time": "04:11", "expiry_date": "20170621", "expiry_time": "12:51", "start_date": "20170601"},
{"legal_status_classification": "17", "start_time": "07:54", "expiry_date": "20170605", "expiry_time": "05:04", "start_date": "20170512"},
{"legal_status_classification": "31", "start_time": "02:41", "expiry_date": "20170520", "expiry_time": "11:14", "start_date": "20170920"},
{"legal_status_classification": "03", "start_time": "23:17", "expiry_date": "20170504", "expiry_time": "06:29", "start_date": "20170925"},
{"legal_status_classification": "05", "start_time": "17:41", "expiry_date": "20170403", "expiry_time": "01:23", "start_date": "20170331"},
{"legal_status_classification": "36", "start_time": "05:05", "expiry_date": "20170322", "expiry_time": "14:30", "start_date": "20170312"},
{"legal_status_classification": "03", "start_time": "03:45", "expiry_date": "20170310", "expiry_time": "11:56", "start_date": "20170213"},
{"legal_status_classification": "01", "start_time": "14:03", "expiry_date": "20170201", "expiry_time": "06:02", "start_date": "20170118"},
{"legal_status_classification": "09", "start_time": "07:07", "expiry_date": "20170121", "expiry_time": "22:15", "start_date": "20170111"}
],
"system": {"record_id": "1484925971009999954", "provider_record_id": "RTD 0167983 0000046", "sus_version": "20170927072844117", "spell_id": "1484925971009999954"}
},{
"mental_health_act_legal_status":
[
{"legal_status_classification": "15", "start_time": "18:51", "expiry_date": "20170919", "expiry_time": "23:04", "start_date": "20170904"},
{"legal_status_classification": "19", "start_time": "06:11", "expiry_date": "20170908", "expiry_time": "09:17", "start_date": "20170818"},
{"legal_status_classification": "15", "start_time": "20:36", "expiry_date": "20170818", "expiry_time": "07:44", "start_date": "20170723"},
{"legal_status_classification": "01", "start_time": "16:12", "expiry_date": "20170809", "expiry_time": "21:25", "start_date": "20170718"},
{"legal_status_classification": "09", "start_time": "06:06", "expiry_date": "20170707", "expiry_time": "18:10", "start_date": "20170615"},
{"legal_status_classification": "07", "start_time": "11:53", "expiry_date": "20170625", "expiry_time": "14:09", "start_date": "20170527"},
{"legal_status_classification": "19", "start_time": "07:13", "expiry_date": "20170529", "expiry_time": "00:39", "start_date": "20170503"},
{"legal_status_classification": "35", "start_time": "16:01", "expiry_date": "20170521", "expiry_time": "07:18", "start_date": "20170912"},
{"legal_status_classification": "35", "start_time": "02:45", "expiry_date": "20170430", "expiry_time": "06:47", "start_date": "20170902"},
{"legal_status_classification": "03", "start_time": "19:51", "expiry_date": "20170410", "expiry_time": "18:46", "start_date": "20170319"},
{"legal_status_classification": "13", "start_time": "20:58", "expiry_date": "20170310", "expiry_time": "10:52", "start_date": "20170220"},
{"legal_status_classification": "02", "start_time": "13:11", "expiry_date": "20170217", "expiry_time": "00:42", "start_date": "20170127"},
{"legal_status_classification": "15", "start_time": "18:23", "expiry_date": "20170209", "expiry_time": "20:03", "start_date": "20170120"},
{"legal_status_classification": "07", "start_time": "00:59", "expiry_date": "20170119", "expiry_time": "12:33", "start_date": "20161231"}
],
"system": {"record_id": "1484925971009999916", "provider_record_id": "RTD 0167983 0000084", "sus_version": "20170927072844117", "spell_id": "1484925971009999916"}
}]';
SELECT * FROM OPENJSON (#JSON)
WITH ([SUS_VERSION] VARCHAR (255) '$.system.sus_verion',
[SPELL_ID] VARCHAR (255) '$.system.spell_id',
[RECORD_ID] VARCHAR (255)'$.system.record_id',
[PROVIDER_RECORD_ID] VARCHAR (255) '$.system.provider_record_id'
);

Morris line chart y axis going beyond 100%

I am using Morris line chart but my y axis is going beyond 100%.
Below is my json data:
[
{"y":"20/03","Threshold":"70","x TV":"0","x CA":"100","x Retail":"0","x Mobility":"100","x Media":"0"},
{"y":"21/03","Threshold":"70","x TV":"100","x CA":"87.69","x Retail":"100","x Mobility":"70","x Media":"86.67"},
{"y":"22/03","Threshold":"70","x TV":"0","x CA":"87.5","x Retail":"100","x Mobility":"93.42","x Media":"82.14"},
{"y":"23/03","Threshold":"70","x TV":"0","x CA":"0","x Retail":"0","x Mobility":"0","x Media":"0"},
{"y":"24/03","Threshold":"70","x TV":"0","x CA":"0","x Retail":"0","x Mobility":"0","x Media":"0"},
{"y":"25/03","Threshold":"70","x TV":"0","x CA":"0","x Retail":"0","x Mobility":"0","x Media":"0"},
{"y":"26/03","Threshold":"70","x TV":"0","x CA":"0","x Retail":"0","x Mobility":"0","x Media":"0"}
]
Please find below Morris line chart code:
Morris.Line({
element: 'morris-line-chart',
data: jsonData,
xkey: 'y',
xLabels: 'day',
ykeys: ['x TV', 'x CA', 'x Retail', 'x Mobility', 'x Media', 'Threshold'],
ymax: 100,
ymin:0,
labels: ['x TV', 'x CA', 'x Retail', 'x Mobility', 'x Media', 'Threshold'],
hideHover: 'auto',
resize: false,
parseTime: false,
lineColors: ['#C91530', '#871A35', '#E25D00', '#8EADB8', '#F2A200', '#D4D4D4'],
//yLabelFormat: function (y) { return y.toString(); },
postUnits: '%'
});
For date 21/03 and 22/03 x Retail has value as 100% my observation that path element not drawing the straight line.
The line goes beyond 100% because, by default, Morris.Line is set to draw curved lines (smooth: true). That's why, even if you don't have values greater than 100%, the line goes beyond 100%.
If you don't want to have curved lines, you can set the smooth property to false:
smooth: false
But there's no property in the latest Morris version (0.5.1) to not curve the line if the value reaches the ymax.
var jsonData = [
{ "y": "20/03", "Threshold": "70", "x TV": "0", "x CA": "100", "x Retail": "0", "x Mobility": "100", "x Media": "0" },
{ "y": "21/03", "Threshold": "70", "x TV": "100", "x CA": "87.69", "x Retail": "100", "x Mobility": "70", "x Media": "86.67" },
{ "y": "22/03", "Threshold": "70", "x TV": "0", "x CA": "87.5", "x Retail": "100", "x Mobility": "93.42", "x Media": "82.14" },
{ "y": "23/03", "Threshold": "70", "x TV": "0", "x CA": "0", "x Retail": "0", "x Mobility": "0", "x Media": "0" },
{ "y": "24/03", "Threshold": "70", "x TV": "0", "x CA": "0", "x Retail": "0", "x Mobility": "0", "x Media": "0" },
{ "y": "25/03", "Threshold": "70", "x TV": "0", "x CA": "0", "x Retail": "0", "x Mobility": "0", "x Media": "0" },
{ "y": "26/03", "Threshold": "70", "x TV": "0", "x CA": "0", "x Retail": "0", "x Mobility": "0", "x Media": "0" }]
Morris.Line({
element: 'morris-line-chart',
data: jsonData,
xkey: 'y',
xLabels: 'day',
ykeys: ['x TV', 'x CA', 'x Retail', 'x Mobility', 'x Media', 'Threshold'],
ymax: 100,
ymin:0,
labels: ['x TV', 'x CA', 'x Retail', 'x Mobility', 'x Media', 'Threshold'],
hideHover: 'auto',
resize: false,
parseTime: false,
smooth: false,
lineColors: ['#C91530', '#871A35', '#E25D00', '#8EADB8', '#F2A200', '#D4D4D4'],
//yLabelFormat: function (y) { return y.toString(); },
postUnits: '%'
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css" rel="stylesheet"/>
<div id="morris-line-chart"></div>

Docusign List Population with Rest Endpoint (Modify Existing Recipient Tabs)

We are trying to populate an existing empty list on a DocuSign Template with some contact methods. The list needs to be populated on the fly since the number and default selected contact method varies with each recipient.
Here is our JSON request we PUT to https://demo.docusign.net/restapi/v2/accounts/:accountId/envelopes/:envelopeId/recipients/:recipientId/tabs (we have confirmed at the necessary variables in the URL have been filled in).
{
"accountId":"163051",
"checkboxTabs":[],
"companyTabs":[],
"dateTabs":[],
"emailTabs":[],
"envelopeId":"048f9ee2-df6e-482d-9e04-abb5e630bf83",
"fullNameTabs":[],
"initialHereTabs":[],
"listTabs":[{
"documentId":"1",
"locked":"False",
"name":"Preferred Contact Method",
"pageNumber":"1",
"tabId":"661499f2-4dda-419d-82ad-f943871407e9",
"tabLabel":"Preferred Contact Method",
"value":"Any",
"listItems":[{
"selected":"True",
"text":"Any",
"value":"1"},{
"selected":"False",
"text":"E-mail",
"value":"2"},{
"selected":"False",
"text":"Phone",
"value":"3"},{
"selected":"False",
"text":"Fax",
"value":"4"},{
"selected":"False",
"text":"Mail",
"value":"5"},{
"selected":"False",
"text":"Home Phone",
"value":"6"},{
"selected":"False",
"text":"Mobile Phone",
"value":"7"},{
"selected":"False",
"text":"Text",
"value":"8"},{
"selected":"False",
"text":"Facebook",
"value":"9"}]
}],
"noteTabs":[],
"radioGroupTabs":[],
"recipientId":"1",
"signHereTabs":[],
"textTabs":[],
"titleTabs":[],
"zipTabs":[]
}
And the response we are getting back:
The remote server returned an error: (500) Internal Server Error.
{
"errorCode": "INVALID_TAB_OPERATION",
"message": "The Tab specified is not valid for the requested operation. Attempt to create 'text' tab from invalid tab type.
}
There are no text tabs in our request. There is a tab with ID 661499f2-4dda-419d-82ad-f943871407e9 of type List on the template.
We were able to get this working a few months ago but fear a new version may have broken this functionality.
In case it is needed here is the "Get Recipient Tabs" response for the same envelope we are trying to modify. The list tab in question is at the bottom.
{
"signHereTabs": [
{
"name": "Sign Here",
"tabLabel": "Signature 12",
"scaleValue": 1,
"optional": "false",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "106",
"yPosition": "270",
"tabId": "00de6704-729d-4726-b102-829f914fda56"
}
],
"dateSignedTabs": [
{
"name": "Date Signed",
"value": "",
"tabLabel": "Date Signed",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "385",
"yPosition": "303",
"tabId": "6236a6cc-2d13-452e-af9b-6fe9706ff500"
}
],
"textTabs": [
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Last Name",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "36",
"yPosition": "146",
"tabId": "5aaee6db-a26a-4102-b77e-2eb4fb6e0c5b"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "First Name",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "224",
"yPosition": "147",
"tabId": "999d3f04-99b5-4fae-b69f-bd3e6b27e30d"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "false",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"maxLength": 1,
"tabLabel": "Middle Initial",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "368",
"yPosition": "145",
"tabId": "fdb77bb3-bbe0-4a0c-bf66-ac9fbaa4bb26"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "false",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Maiden Name",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "427",
"yPosition": "145",
"tabId": "ae99f579-0016-4839-b179-444fae166f71"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Address Street",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "36",
"yPosition": "175",
"tabId": "506abe87-b144-4d93-8576-b33a2abc4d85"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "false",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Apt",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "367",
"yPosition": "173",
"tabId": "7eaa32ef-b9b3-40e5-a5d3-5975134fb90d"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "DOB",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "429",
"yPosition": "175",
"tabId": "8f895bec-4f7a-4040-be77-f17374b30765"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Address City",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "36",
"yPosition": "202",
"tabId": "af6cbd27-072f-494d-8cb0-f60578b5e6c9"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Address State",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "212",
"yPosition": "202",
"tabId": "1ecc4a85-5252-4f4f-97d8-22238f46aae5"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Address Zip",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "368",
"yPosition": "202",
"tabId": "0dfb3731-7ce4-4c10-81f2-784428427ee7"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "false",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Data Field 17",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "446",
"yPosition": "256",
"tabId": "cb9a86c5-6ecf-4593-8c54-4b7e7d08ffb8"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "false",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Data Field 18",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "497",
"yPosition": "270",
"tabId": "0fc2dc21-7916-431f-aa38-a3b4df6c7bcf"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "false",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Data Field 19",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "498",
"yPosition": "283",
"tabId": "e0f8676f-6f98-43ee-81db-63734bfe3155"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "I am willing to travel.",
"width": 162,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Data Field 49",
"documentId": "1",
"recipientId": "1",
"pageNumber": "5",
"xPosition": "55",
"yPosition": "15",
"tabId": "5c3ddd45-c36c-4214-8b80-d800e0fa5b61"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "I am NOT willing to travel.",
"width": 162,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Data Field 50",
"documentId": "1",
"recipientId": "1",
"pageNumber": "5",
"xPosition": "56",
"yPosition": "41",
"tabId": "47d7d2ff-2a4f-4de7-9f67-311cd0b172c8"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "Preferred Contact Method",
"width": 138,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Data Field 52",
"documentId": "1",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "81",
"yPosition": "21",
"tabId": "75b83aa1-c906-4827-9fc2-6cc4177843c6"
}
],
"ssnTabs": [
{
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "SSNTOOLTIP",
"value": "",
"width": 48,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "SSN",
"documentId": "1",
"recipientId": "1",
"pageNumber": "4",
"xPosition": "429",
"yPosition": "204",
"tabId": "11b62284-7613-48df-8498-fa019f3a42a3"
}
],
"radioGroupTabs": [
{
"documentId": "1",
"recipientId": "1",
"groupName": "Radio Button 13",
"radios": [
{
"pageNumber": "4",
"xPosition": "297",
"yPosition": "229",
"value": "Radio",
"selected": "false",
"tabId": "2b2312d2-3ed6-469e-8aeb-8de588ae16d3"
},
{
"pageNumber": "4",
"xPosition": "297",
"yPosition": "243",
"value": "Radio",
"selected": "false",
"tabId": "1a997301-f5d8-4e86-8ead-9d706490faf2"
},
{
"pageNumber": "4",
"xPosition": "297",
"yPosition": "256",
"value": "Radio",
"selected": "false",
"tabId": "705df9df-9e1d-478b-b991-9b31e919c85c"
},
{
"pageNumber": "4",
"xPosition": "297",
"yPosition": "271",
"value": "Radio",
"selected": "false",
"tabId": "d74742c2-742e-43d5-b1c5-04854ec8a7c5"
}
]
},
{
"groupName": "Radio Button Group Test",
"radios": [
{
"pageNumber": "5",
"xPosition": "28",
"yPosition": "15",
"value": "TravelYes",
"selected": "false",
"tabId": "30962105-0337-4d98-b4dd-058ae736d6fb"
},
{
"pageNumber": "5",
"xPosition": "27",
"yPosition": "40",
"value": "TravelNo",
"selected": "false",
"tabId": "351ba656-80dd-43ea-936a-fd322d63c0c0"
}
]
}
],
"listTabs": [
{
"listItems": [
{
"text": "",
"value": "",
"selected": "true"
},
{
"text": "",
"value": "",
"selected": "true"
}
],
"value": "",
"width": 77,
"shared": "false",
"requireInitialOnSharedChange": "false",
"tabLabel": "Preferred Contact Method",
"documentId": "1",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "220",
"yPosition": "20",
"tabId": "661499f2-4dda-419d-82ad-f943871407e9"
}
]
}
This is a confirmed bug with DocuSign. I'm hoping this will get fixed in the next release but can't confirm yet. Once fixed I will update this answer to include the elements of a proper api call to modify an existing listTab, which I believe you're currently doing.