<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: String indices must be integers in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/String-indices-must-be-integers/m-p/4010352#M53720</link>
    <description>&lt;P&gt;Thanks for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here, I already convert into json. But, I don't know why the value of ticker_sentiment is still string.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2024 05:03:21 GMT</pubDate>
    <dc:creator>Prakash1050</dc:creator>
    <dc:date>2024-06-26T05:03:21Z</dc:date>
    <item>
      <title>String indices must be integers</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/String-indices-must-be-integers/m-p/4008876#M53694</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;String indices must be integers&lt;BR /&gt;This is my code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This code output :&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i need is....,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to fetch the ticker values from the output in the ticker_sentiment json format values that is in the below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[{ticker=&lt;U&gt;&lt;STRONG&gt;MSFT&lt;/STRONG&gt;&lt;/U&gt;, ticker_sentiment_label=Somewhat-Bullish, ticker_sentiment_score=0.163239, relevance_score=0.04028}, {ticker=NVDA, ticker_sentiment_label=Somewhat-Bullish, ticker_sentiment_score=0.235239, relevance_score=0.48854}, {ticker=VMW, ticker_sentiment_label=Neutral, ticker_sentiment_score=0.056248, relevance_score=0.04028}, {ticker=AVGO, ticker_sentiment_label=Somewhat-Bullish, ticker_sentiment_score=0.274491, relevance_score=0.520477}]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need output is MSFT. So,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I Witten this code :&amp;nbsp; &amp;nbsp; print(news_json_1["json_object"]["ticker_sentiment"][0])&lt;/P&gt;&lt;P&gt;this code output is : [&lt;/P&gt;&lt;P&gt;so, I written this code :&amp;nbsp; &amp;nbsp; print(news_json_1["json_object"]["ticker_sentiment"]["ticker"])&lt;/P&gt;&lt;P&gt;this code got error :&amp;nbsp; &amp;nbsp; &amp;nbsp;TypeError&amp;nbsp; &amp;nbsp; &amp;nbsp;Traceback&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (most recent call last)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(news_json_1["json_object"]["time_published"])&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(news_json_1["json_object"]["url"])&lt;/P&gt;&lt;P&gt;---&amp;gt; print(news_json_1["json_object"]["ticker_sentiment"][0]["ticker"])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TypeError: string indices must be integers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to fetch the first ticker?&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;I need to fetch the ticker value from the output.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 09:49:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/String-indices-must-be-integers/m-p/4008876#M53694</guid>
      <dc:creator>Prakash1050</dc:creator>
      <dc:date>2024-06-25T09:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: String indices must be integers</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/String-indices-must-be-integers/m-p/4009558#M53710</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The value of ticker_sentiment is a string, not an array. You will need to parse that string again as JSON before you can access the first item in the array.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 16:50:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/String-indices-must-be-integers/m-p/4009558#M53710</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-25T16:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: String indices must be integers</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/String-indices-must-be-integers/m-p/4010352#M53720</link>
      <description>&lt;P&gt;Thanks for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here, I already convert into json. But, I don't know why the value of ticker_sentiment is still string.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 05:03:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/String-indices-must-be-integers/m-p/4010352#M53720</guid>
      <dc:creator>Prakash1050</dc:creator>
      <dc:date>2024-06-26T05:03:21Z</dc:date>
    </item>
  </channel>
</rss>

