I am in a scenario where json keys keeps on changing dynamically after every 3 hours and I have to display both keyname and its value in listview Item Template
My xaml is given below
<Grid Margin="0,30.333,0,-0.333" Background="Black" >
<ListView IsItemClickEnabled="True" IsEnabled="True" ItemClick="listview1_ItemClick" ScrollViewer.VerticalScrollMode="Enabled" ScrollViewer.VerticalScrollBarVisibility="Visible" x:Name="listview1" ItemsSource="{Binding Taxi}" FontSize="17" Margin="10,0,-10,0">
<ListView.Items>
</ListView.Items>
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Border Tapped="Border_Tap" Height="90">
<StackPanel Name="expand" Background="White" Height="220" >
<StackPanel Orientation="Horizontal" Margin="10,10,0,0">
<TextBlock AllowDrop="True" Grid.Column="1" Margin="50,0,0,0" HorizontalAlignment="Left" FontSize="10" Foreground="Black" Text="{Binding Jsonkey}" ></TextBlock>
<TextBlock Name="tb" Grid.Column="2" HorizontalAlignment="Right" AllowDrop="True" FontSize="6" Foreground="Black" Width="204" Text="{Binding jsonvalue}" ></TextBlock>
</StackPanel>
</StackPanel>
</Border>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
This is JSON Code. Inside Hello object there is Invoice object and the key names inside Invoice object keep on changing every 3 hrs. Please help.
{"Hello":[{"one":"two","three":"4","five":"49","six":"14","seven":"wow","eight":"20","nine":"18.5161192","Ten":"73.8432134","ChildPresent":true,"PackageName":"com.tfs.consumer","Invoice":{"12":"ttt 49","12":"ttt 49","13":"4 Km","14":"ttt 14","22":"4 mins"},"15":"49"},{"one":"19Cab","three":"645","five":"49","six":"16","seven":"19","eight":"20","nine":"18.512943267822266","Ten":"73.844207763671875","ChildPresent":true,"PackageName":"com.19cab","Invoice":{"12":"ttt 49","12":"ttt 49","13":"3 Km","18":"ttt 16","22":"4 mins"},"15":"49"},{"one":"17","three":"5","five":"90","six":"12","seven":"Genie","eight":"Mini","nine":"18.5097383333333","Ten":"73.833285","ChildPresent":true,"PackageName":"com.winit.17cab","Invoice":{"12":"ttt 90","12":"ttt 90","13":"4 Km","18":"ttt 12","22":"4 mins"},"15":"90"},{"one":"two","three":"5","five":"49","six":"16","seven":"20","eight":"Dash","nine":"18.5106402","Ten":"73.8354575","ChildPresent":true,"PackageName":"com.tfs.consumer","Invoice":{"12":"ttt 49","12":"ttt 49","13":"4 Km","14":"ttt 16","22":"4 mins"},"15":"49"},{"one":"Ola","three":"4","five":"49","six":"12","seven":"Mini","eight":"Mini","nine":"18.5262168","Ten":"73.8419541","ChildPresent":true,"PackageName":"com.olacabs.customer","Invoice":{"12":"ttt 49","12":"ttt 49","13":"2 Km","18":"ttt 12","22":"1 mins"},"15":"49"},{"one":"19Cab","three":"945","five":"49","six":"16","seven":"19","eight":"20","nine":"18.528423309326172","Ten":"73.852615356445313","ChildPresent":true,"PackageName":"com.19cab","Invoice":{"12":"ttt 49","12":"ttt 49","13":"3 Km","18":"ttt 16","22":"4 mins"},"15":"49"},{"one":"17","three":"6","five":"90","six":"12","seven":"Genie","eight":"Mini","nine":"18.52775752","Ten":"73.83982704","ChildPresent":true,"PackageName":"com.winit.17cab","Invoice":{"12":"ttt 90","12":"ttt 90","13":"4 Km","18":"ttt 12","22":"4 mins"},"15":"90"},{"one":"Ola","three":"4","five":"49","six":"15","seven":"20","eight":"20","nine":"18.50574","Ten":"73.8329716","ChildPresent":true,"PackageName":"com.olacabs.customer","Invoice":{"12":"ttt 49","12":"ttt 49","13":"2 Km","18":"ttt 15","22":"1 mins"},"15":"49"},{"one":"16","three":12,"five":"200","six":"12","seven":"4-Seater","eight":"Mini","nine":"18.5394509","Ten":"73.8327328","ChildPresent":true,"PackageName":"in.16.customerapp","Invoice":{"12":"ttt 200","12":"ttt 200","13":"10 Km","14":"ttt 12","22":"4 mins"},"15":"200"},{"one":"16","three":17,"five":"200","six":"12","seven":"4-Seater","eight":"Mini","nine":"18.5297324","Ten":"73.8682225","ChildPresent":true,"PackageName":"in.16.customerapp","Invoice":{"12":"ttt 200","12":"ttt 200","13":"10 Km","14":"ttt 12","22":"4 mins"},"15":"200"},{"one":"16","three":5,"five":"220","six":"16","seven":"6-Seater","eight":"Prime","nine":"18.5084051","Ten":"73.830446","ChildPresent":true,"PackageName":"in.16.customerapp","Invoice":{"12":"ttt 220","12":"ttt 220","13":"10 Km","14":"ttt 16","22":"4 mins"},"15":"220"},{"one":"16","three":10,"five":"220","six":"16","seven":"6-Seater","eight":"Prime","nine":"18.5350957","Ten":"73.8384761","ChildPresent":true,"PackageName":"in.16.customerapp","Invoice":{"12":"ttt 220","12":"ttt 220","13":"10 Km","14":"ttt 16","22":"4 mins"},"15":"220"},{"one":"21","three":"3","seven":"21GO","nine":"0.0","Ten":"0.0","eight":"Mini","five":"50","six":"8","ChildPresent":true,"PackageName":"com.21cab","Invoice":{"12":"ttt 50","12":"ttt 25","18":"ttt 8","13":"ttt 50","22":"4 mins"},"15":"50"},{"one":"21","three":"3","seven":"21X","nine":"0.0","Ten":"0.0","eight":"Dash","five":"150","six":"15","ChildPresent":true,"PackageName":"com.21cab","Invoice":{"12":"ttt 50","12":"ttt 80","18":"ttt 15","13":"ttt 150","22":"4 mins"},"15":"50"},{"one":"21","three":"11","seven":"21Sumo","nine":"0.0","Ten":"0.0","eight":"Dash","five":"150","six":"15","ChildPresent":true,"PackageName":"com.21cab","Invoice":{"12":"ttt 150","12":"ttt 80","18":"ttt 15","13":"ttt 150","22":"4 mins"},"15":"150"}],"ChildPresent":true}