-
python concat auto insert backslash i can't remove
I have a problem with my python concat, as you see the value of "item" holds the right value, but when i add it to a string, it inserts backslashes. I have tried with replace, rstrip and strip. Non of them worked.I don't know if I am missing something, hope you can help.
a prints:
`'"name": "[parameters(\'dynamicsax_1_Connection_Name\')]"'`
item prints:
`'dynamicsax_1_Connection_Name'
`Code:
`entries = Path("C:\\Users\\Aske.Meyer\\D365 Integration\\ERPD365AzureResources\\LogicApps")
my_list_of_param = ['dynamicsax_1_Connection_Name', 'dynamicsax_2_Connection_Name','dynamicsax_3_Connection_Name',
'servicebus_2_Connection_Name','servicebus_3_Connection_Name','servicebus_3_Connection_DisplayName',
'servicebus_4_Connection_Name', 'servicebus_6_Connection_Name', 'servicebus_6_Connection_DisplayName',
'documentdb_1_Connection_Name', 'documentdb_1_Connection_DisplayName', 'documentdb_1_databaseAccount']
empty_list= []
found_params = []
not_found_params = []
for entry in entries.iterdir():
with open(entry) as file:
print(file.name)
content = json.load(file) #exclude param files
parameter = content['parameters']
for item in my_list_of_param:
param_name = "\"name\": \"[parameters(\'"+item+"\')]\""
a = param_name.replace("\\", "")
print(a)
print(item)`
Log In to reply.
Popular Salesforce Blogs
Your 1st Step to become a Salesforce Certified Platform Developer 1 [Exam Notes]
Are you one among the many who endeavour to become a proficient Salesforce Developer? Then, this would be your first step after the completion of…
How Salesforce Customization Services Can Help Your Business
Salesforce is known to have thousands of features used by businesses, along with customization options. Off-the-shelf Salesforce solutions might initially help a business but, moving…
The All New Salesforce Sales Cloud to Help You Progress in a Digital-First World
Today Salesforce has announced the next generation of Sales Cloud, which is designed for a socially distant, digital-first world. This covers seven new features, some…
Popular Salesforce Videos
Salesforce Tutorial | Data Extensions in Marketing Cloud
In this video, we are going to show you something so simple, yet so powerful, you may not even know it existed. For more Salesforce…
Manage Packages & Post Installation Script | Salesforce Managed Packages
This video will give you a brief overview of Managed Packages and Unmanaged Packages in Salesforce. You will get a quick glance at how to…
Boosting your Application's Marketing through Salesforce AppExchange
Explore the key benefits of AppExchange, the largest business app marketplace, and discover how you can tap into its vast ecosystem of potential customers. In…
Popular Salesforce Infographics
Customer Service Words and Acronyms
Savvy service reps know it is important to stay hip with the lingo. If it seems like customers and agents always keep you guessing with…
How Sales Reps are Staying at the Top of Their Game | Salesforce Guide
Sales reps around the world had to rapidly adopt new methods to work around lockdowns and travel restrictions. In some cases, this meant learning new…
Salesforce Field Service: Power Up Your Field Operations
Salesforce Field Service, commonly known as Field Service Lightning (FSL), is the extension of Service Cloud that provides a unified view of workforce management. In…