Search This Blog

Showing posts with label processing. Show all posts
Showing posts with label processing. Show all posts

Monday, June 8, 2020

Python Array of Array - Inner Array processing

#Program -1, To print array of array 
 
a = [[{'Key': 'key700', 'Value': 'val145'}, {'Key': 'key123', 'Value': 'val123'}]]

for i in range(len(a)):
    for j in range(len(a[i])):
        jsonData = a[i][j]
        #print(jsonData);
        for (k, v) in jsonData.items():
            print("Key: " + k)
            print("Value: " + str(v))

   


'''
output
********
Key: Key
Value: key700
Key: Value
Value: val145
Key: Key
Value: Key123
Key: Value
Value: val123

'''


#Program -2 , print only the key=userName

import json

a = [[{'Key': 'age', 'Value': '10'}, {'Key': 'userName', 'Value': 'vijay'}, {'Key': 'address', 'Value': '1, car st'}, {'Key': 'userName', 'Value': 'pranika'}]]

for i in range(len(a)):
    for j in range(len(a[i])):
        jsonData = a[i][j]
        data = json.loads(json.dumps(jsonData ) );
        if ( jsonData['Key'] == 'Name' ):
            print ( jsonData['Value'] )

           
       
   


'''
output
********
vijay
pranika
'''

 

Thursday, December 21, 2017

Error: The server encountered an error processing the request. See server logs for more details

This issue comes into picture whenever there is any issue at WCF service.
So see more details about the issue, you need to includeexceptiondetailInfaults attribute to true in servicedebug tag.

Go to your web.config


<servicebehaviors>
        <behavior name="myServiceBehavior">
          <servicedebug includeexceptiondetailinfaults="true" />
        </behavior>
</servicebehaviors>

Either you can also add class attribute to the service class.

Hit Counter


View My Stats