-
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
Unleashing Potential: A Strategic Roadmap to Salesforce Staff Augmentation
In the vast landscape of business evolution, there exists a compass that navigates the treacherous waters of innovation and efficiency—Salesforce staff augmentation. This strategic beacon…
Why Work With a Salesforce Partner? Here are All the Reasons
A lot of companies are looking to implement Salesforce as a valuable tool to help them automate processes, strengthen customer relationships, and more. Implementing Salesforce…
What is Salesforce Net Zero Cloud?
Barely a day goes by without there being something in the news about climate change, sustainability or carbon footprints. It is a major focus for…
Popular Salesforce Videos
Guided Setup with Salesforce Field Service Administration - Webinar Recording
Salesforce Field Service is a complete, end-to-end solution for customer service in the field. Salesforce Field Service brings together customers, employees, and products on a…
ampus Plus: Salesforce Grants Management System (GMS) Testimonial | TechForce Services
Hear from Campus Plus on their game-changing Grants Management System (GMS) built on Salesforce by TechForce Services! They replaced spreadsheets and siloed forms with a…
Access Salesforce Maps Schedule and Manage Saved Events
Watch this video to learn how to Access Salesforce Maps Schedule and Review and Manage Saved Events. Do let us know in the comment section…
Popular Salesforce Infographics
How to Build Leads with Salesforce
Salesforce is a force to reckon with when it comes to inbound lead management. However, for certain businesses, especially smaller ones, the various add-ons and…
Streamlining the Sales Process with Salesforce CPQ
Implementing Salesforce CPQ offers numerous business advantages, such as automating tasks, including sales quotations and price determination. Businesses that use Salesforce CPQ can expect increased…
Demystifying Salesforce Blockchain
Salesforce Blockchain is currently available to select design partners and will be generally available in 2020. This Informative Infographic will help readers to decide to…