title: Python: to get specific element from json data
body: <p>The original data is tuple</p>
  <pre><code>    data = {'trades': [{'id': '9229', 'instrument': 'USD_SGD', 'price': '1.34505', 'openTime': '2022-01-24T08:01:01.767987144Z', 'initialUnits': '1000', 'initialMarginRequired': '27.9310', 'state': 'OPEN', 'currentUnits': '1000', 'realizedPL': '0.0000', 'financing': '0.0000', 'dividendAdjustment': '0.0000', 'unrealizedPL': '2.0463', 'marginUsed': '28.1266', 'takeProfitOrder': {'id': '9240', 'createTime': '2022-01-24T08:40:54.539350738Z', 'replacesOrderID': '9230', 'type': 'TAKE_PROFIT', 'tradeID': '9229', 'price': '1.50000', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'state': 'PENDING'}, 'stopLossOrder': {'id': '9231', 'createTime': '2022-01-24T08:01:02.589631870Z', 'type': 'STOP_LOSS', 'tradeID': '9229', 'price': '1.01000', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'triggerMode': 'TOP_OF_BOOK', 'state': 'PENDING'}}, {'id': '9219', 'instrument': 'USD_SGD', 'price': '1.34465', 'openTime': '2022-01-24T07:45:53.369040131Z', 'initialUnits': '1000', 'initialMarginRequired': '27.9312', 'state': 'OPEN', 'currentUnits': '1000', 'realizedPL': '0.0000', 'financing': '0.0000', 'dividendAdjustment': '0.0000', 'unrealizedPL': '2.4618', 'marginUsed': '28.1266'}, {'id': '9216', 'instrument': 'USD_SGD', 'price': '1.34454', 'openTime': '2022-01-24T07:45:41.086253690Z', 'initialUnits': '1000', 'initialMarginRequired': '27.9355', 'state': 'OPEN', 'currentUnits': '1000', 'realizedPL': '0.0000', 'financing': '0.0000', 'dividendAdjustment': '0.0000', 'unrealizedPL': '2.5761', 'marginUsed': '28.1266', 'takeProfitOrder': {'id': '9246', 'createTime': '2022-01-24T09:05:54.649091912Z', 'replacesOrderID': '9217', 'type': 'TAKE_PROFIT', 'tradeID': '9216', 'price': '1.50000', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'state': 'PENDING'}}, {'id': '9082', 'instrument': 'EUR_GBP', 'price': '0.83590', 'openTime': '2022-01-24T06:31:24.859730068Z', 'initialUnits': '465584', 'initialMarginRequired': '14720.1831', 'state': 'OPEN', 'currentUnits': '465584', 'realizedPL': '0.0000', 'financing': '0.0000', 'dividendAdjustment': '0.0000', 'unrealizedPL': '2194.7683', 'marginUsed': '14795.8871', 'takeProfitOrder': {'id': '9083', 'createTime': '2022-01-24T06:31:25.239631861Z', 'type': 'TAKE_PROFIT', 'tradeID': '9082', 'price': '0.84089', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'state': 'PENDING'}, 'stopLossOrder': {'id': '9084', 'createTime': '2022-01-24T06:31:25.572935468Z', 'type': 'STOP_LOSS', 'tradeID': '9082', 'price': '0.83313', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'triggerMode': 'TOP_OF_BOOK', 'state': 'PENDING'}}, {'id': '8954', 'instrument': 'EUR_USD', 'price': '1.13149', 'openTime': '2022-01-24T06:27:15.383062430Z', 'initialUnits': '-465031', 'initialMarginRequired': '14702.3271', 'state': 'OPEN', 'currentUnits': '-462031', 'realizedPL': '-2.9616', 'closingTransactionIDs': ['9175', '9177', '9179'], 'financing': '0.0000', 'dividendAdjustment': '0.0000', 'averageClosePrice': '1.13219', 'unrealizedPL': '1047.3621', 'marginUsed': '14682.9756', 'takeProfitOrder': {'id': '8955', 'createTime': '2022-01-24T06:27:16.052566962Z', 'type': 'TAKE_PROFIT', 'tradeID': '8954', 'price': '1.12647', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'state': 'PENDING'}, 'stopLossOrder': {'id': '8956', 'createTime': '2022-01-24T06:27:16.405563212Z', 'type': 'STOP_LOSS', 'tradeID': '8954', 'price': '1.13421', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'triggerMode': 'TOP_OF_BOOK', 'state': 'PENDING'}}], 'lastTransactionID': '9257'}
  ([{'unrealizedPL': 2.0463, 'currentUnits': 1000, 'trade_id': 9229, 'openTime': datetime.datetime(2022, 1, 24, 8, 1, 1, 767987, tzinfo=tzutc()), 'instrument': 'USD_SGD'},
    {'unrealizedPL': 2.4618, 'currentUnits': 1000, 'trade_id': 9219, 'openTime': datetime.datetime(2022, 1, 24, 7, 45, 53, 369040, tzinfo=tzutc()), 'instrument': 'USD_SGD'},
    {'unrealizedPL': 2.5761, 'currentUnits': 1000, 'trade_id': 9216, 'openTime': datetime.datetime(2022, 1, 24, 7, 45, 41, 86253, tzinfo=tzutc()), 'instrument': 'USD_SGD'},
    {'unrealizedPL': 2194.7683, 'currentUnits': 465584, 'trade_id': 9082, 'openTime': datetime.datetime(2022, 1, 24, 6, 31, 24, 859730, tzinfo=tzutc()), 'instrument': 'EUR_GBP'},
    {'unrealizedPL': 1047.3621, 'currentUnits': -462031, 'trade_id': 8954, 'openTime': datetime.datetime(2022, 1, 24, 6, 27, 15, 383062, tzinfo=tzutc()), 'instrument': 'EUR_USD'}],
   True)
  </code></pre>
  <p><code>print (data[1])</code> result as below:</p>
  <pre><code>{'trades': [{'id': '9229', 'instrument': 'USD_SGD', 'price': '1.34505', 'openTime': '2022-01-24T08:01:01.767987144Z', 'initialUnits': '1000', 'initialMarginRequired': '27.9310', 'state': 'OPEN', 'currentUnits': '1000', 'realizedPL': '0.0000', 'financing': '0.0000', 'dividendAdjustment': '0.0000', 'unrealizedPL': '1.9420', 'marginUsed': '28.1181', 'takeProfitOrder': {'id': '9240', 'createTime': '2022-01-24T08:40:54.539350738Z', 'replacesOrderID': '9230', 'type': 'TAKE_PROFIT', 'tradeID': '9229', 'price': '1.50000', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'state': 'PENDING'}, 'stopLossOrder': {'id': '9231', 'createTime': '2022-01-24T08:01:02.589631870Z', 'type': 'STOP_LOSS', 'tradeID': '9229', 'price': '1.01000', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'triggerMode': 'TOP_OF_BOOK', 'state': 'PENDING'}}, {'id': '9219', 'instrument': 'USD_SGD', 'price': '1.34465', 'openTime': '2022-01-24T07:45:53.369040131Z', 'initialUnits': '1000', 'initialMarginRequired': '27.9312', 'state': 'OPEN', 'currentUnits': '1000', 'realizedPL': '0.0000', 'financing': '0.0000', 'dividendAdjustment': '0.0000', 'unrealizedPL': '2.3574', 'marginUsed': '28.1181'}, {'id': '9216', 'instrument': 'USD_SGD', 'price': '1.34454', 'openTime': '2022-01-24T07:45:41.086253690Z', 'initialUnits': '1000', 'initialMarginRequired': '27.9355', 'state': 'OPEN', 'currentUnits': '1000', 'realizedPL': '0.0000', 'financing': '0.0000', 'dividendAdjustment': '0.0000', 'unrealizedPL': '2.4716', 'marginUsed': '28.1181', 'takeProfitOrder': {'id': '9246', 'createTime': '2022-01-24T09:05:54.649091912Z', 'replacesOrderID': '9217', 'type': 'TAKE_PROFIT', 'tradeID': '9216', 'price': '1.50000', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'state': 'PENDING'}}, {'id': '9082', 'instrument': 'EUR_GBP', 'price': '0.83590', 'openTime': '2022-01-24T06:31:24.859730068Z', 'initialUnits': '465584', 'initialMarginRequired': '14720.1831', 'state': 'OPEN', 'currentUnits': '465584', 'realizedPL': '0.0000', 'financing': '0.0000', 'dividendAdjustment': '0.0000', 'unrealizedPL': '2316.8926', 'marginUsed': '14793.4660', 'takeProfitOrder': {'id': '9083', 'createTime': '2022-01-24T06:31:25.239631861Z', 'type': 'TAKE_PROFIT', 'tradeID': '9082', 'price': '0.84089', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'state': 'PENDING'}, 'stopLossOrder': {'id': '9084', 'createTime': '2022-01-24T06:31:25.572935468Z', 'type': 'STOP_LOSS', 'tradeID': '9082', 'price': '0.83313', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'triggerMode': 'TOP_OF_BOOK', 'state': 'PENDING'}}, {'id': '8954', 'instrument': 'EUR_USD', 'price': '1.13149', 'openTime': '2022-01-24T06:27:15.383062430Z', 'initialUnits': '-465031', 'initialMarginRequired': '14702.3271', 'state': 'OPEN', 'currentUnits': '-462031', 'realizedPL': '-2.9616', 'closingTransactionIDs': ['9175', '9177', '9179'], 'financing': '0.0000', 'dividendAdjustment': '0.0000', 'averageClosePrice': '1.13219', 'unrealizedPL': '930.7071', 'marginUsed': '14680.5730', 'takeProfitOrder': {'id': '8955', 'createTime': '2022-01-24T06:27:16.052566962Z', 'type': 'TAKE_PROFIT', 'tradeID': '8954', 'price': '1.12647', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'state': 'PENDING'}, 'stopLossOrder': {'id': '8956', 'createTime': '2022-01-24T06:27:16.405563212Z', 'type': 'STOP_LOSS', 'tradeID': '8954', 'price': '1.13421', 'timeInForce': 'GTC', 'triggerCondition': 'DEFAULT', 'triggerMode': 'TOP_OF_BOOK', 'state': 'PENDING'}}], 'lastTransactionID': '9257'}
  </code></pre>
  <p>How can I access the <code>trade_id</code> and <code>id</code> that contains <code>type:'TAKE_PROFIT'</code>into a list.</p>